Fix Bug 731951 - Sometimes Ctrl-Q does not close the window.