Fixed bug in partial merge calculation. Added separate debugMerge flag.