That code looks OK to me.. Is it still causing problems?

If so, please post all of your code for us to look at.