fixed photo upload issues