Now it doesn't crash when switching level.