Fix the issue that search function will return all photos