Fixed some image upload issues