FlxNape: prevent crashes on state switch