It will be much easier for someone to help if you post the troubling code. Absent being a prognosticator no one will be able to pinpoint your issue without seeing what you've written.