Properly close window when checking for updates