bugfix for image upload