Fixed a bug where the game would early exit.