photo upload fixes