Bugs Fixed!

Note: Apparently in game maker, if we use the keyword 'var' to create variables, it becomes a local variable and if we created variables directly it is automatically an instance variable. I assumed it was the other way around. That was causing all the bugs!