Changed windowClosed into windowClosing