Fix search box issues.

See commits.