fix bug of being unable to upload avatar