Now only main window has to be closed