Fix crash when game mode changed