now exits when the game frame is closed