fixed the result count bug