fixed image upload bug