Mostly fixed searching bugs