fix bitmask error