Fixed bitmask & serialization issue