allow subclasses to have different values for bitmask than parent

Hi,

This change fixes the #48 and all tests pass now