Fixed the bug with restarting game