force application close after closing window