Add support for bitmasks