fixed image uploading bug