Fixed bug in fixed-chain-count code.