Image upload fixes