fixes in search and duplicates