set shutdownMode to be onMainWindowClose