Fixed bug whie merging planC having more number of scans than the current one.