fix for empty results from query