Fix minor context switching issues when uploading single files.