Fix errors with polynomial representations of bits.