Improved the game to hande input errors