fixed handling of directed & undirected edges in modelMerger