bugfix - wrong bitmask used