fix the photo cache