Bitmask comparison fix