fix some bugs with updateing phots