fix bug when 0 results returned