Image upload error fix