fixed upload file bugs