fixed a photo upload bug