Fix generation of graph.