Fix bitmasks of objects