minor corrections on bit mask