Fixed level transition bug, and restart bug