Fixed error while restarting game