bug fix in exporting graphs to graphviz