Search fix for duplicate records