Have you debugged your code? That should be your first course of action. Don't just read your code; watch it in action. Place a breakpoint at the top of the section you want to debug (F9) and then...