Fix closing window from window X buton