Fixed closing the game at the end.