fixed photo upload bug