Maybe if you format your spaghetti code it would be easier for you to find the problem.

Hint: Then use the "code" tags to post it (Select your code and click on the "#" icon in the upper menu).