fixed reference error when favs count is zero and a search given two dates is requested