fixed image upload issues