fixed the searching for photos