count bug fix.