Fixed a bug in mergeNC when dealing with input files containing multiple times.