small count bug fix