fixed upload bug