added subscription in mainwindow and leave game on close frame