attempt to fix gen_graph.py