fix for crash when search returns 0 results