- Fix a problem with disappearing bits.

Many thanks to Jeroen Hofstee for suggesting a fix.