Fix sorting of initial search