fixed validation for image