I have identified where the issue is coming from, but due to the fact your code is minimized makes it extremely difficult to completely ascertain the issue.
If you give me a day or two, I can most likely resolve your issue or at least diagnose the problem and prescribe a solution.