Could you provide us with a minimum compilable example of the problem?
Some will surely help you.