Move declarations around to prevent spurious NRE during game init if the game is minimized at startup.