Fixed a crash when the search returns no result.