fixed bug in as_bitmask macro