fixes image upload