same array index error in generate_graph.sh.