Fix searching that was broken by fixing sorting.