Fix search bugs.