Fixed a search crash