Fixed the indexing in the graph