fix unset bits counter