fixed binary count bug