Fixed an issue where the game would not closed