fixed double-border count bug