fixed bug in clustering TPTN: merge needs by