Fixed bugs from abandoned combination method.