bugfixes at image upload