Fixed bug that caused it to hang when no results were found