fix for queries with no results