fix a bug for image upload.