fixed upload of images