fixed validation error in image upload