It would be helpful if you could post the rest of your code. We might then be able to diagnose the problem.