I understood your issue.
Please try stripping down your code to make it easier for users to help you debugging.