remove old mainwindow