fix bug closeAction on window