bug fix in profile photo code