fix the upload bug