Set application to close when last window closes