Fix onAfterUpload