Fixed closing window bug.

Now when you close the window, the game quits.