Fixed an issue which caused the upload dialog to not be dismissed.