make that closing the main window exits the app