I think we need too see more of your code, including the definitions of your variables too be able to help.