bug fixes + increase bitmask size