potentially fixed bug with bitcount