It's definitely a problem, but may well not be the only problem. Post your updated code - preferably all of it.