fix links to photos: wrong duplicate photos were deleted