image upload fixes