fixes to searching