Fix crash when window is closed before uploading.
Build 383.