Fix calculation of the Mode Bitfield