In HAdapt.c, at the end of function Boolean UpdateSpkrStats(HMMSet *hset, XFInfo *xfinfo, char *datafn) Note in the original version if '!keepXFormDistinct' and 'xfinfo->xformTMF == NULL' are both true then SaveAllXForms() is called twice (note there's no '{' after the 'else' and thus the bad alignment of the 2nd instance of SaveAllXForms()). So, [...] /* All the files have been handled - store xforms */ if (datafn == NULL) { if (!keepXFormDistinct) { if (xfinfo->xformTMF == NULL) { MakeFN("TMF",xfinfo->outXFormDir,NULL,newFn); SaveAllXForms(hset,newFn,xfinfo->saveBinary); } else MakeFN(xfinfo->xformTMF,xfinfo->outXFormDir,NULL,newFn); SaveAllXForms(hset,newFn,xfinfo->saveBinary); } } return spkrChange; } should be: [...] /* All the files have been handled - store xforms */ if (datafn == NULL) { if (!keepXFormDistinct) { if (xfinfo->xformTMF == NULL) MakeFN("TMF",xfinfo->outXFormDir,NULL,newFn); else MakeFN(xfinfo->xformTMF,xfinfo->outXFormDir,NULL,newFn); SaveAllXForms(hset,newFn,xfinfo->saveBinary); } } return spkrChange; }