fixed a major bug that caused crashing on game start