fixed crash when game mode is turned off and there is a terrain in a scene