fixed photo upload issue