Correcting a bug in calibrate_merge