Bugfix on graph_init