the closing bug is fixed now. i also added a "want-to-save?"-dialog if the user wants to leave the game through the main menu.