Fixes "Close Window" menu item for the preferences window