Messed up the bit math when I switched to my BIT macro, but there were some pre-existing bugs as well