closing the app after the (single) window is closed