fix error on graph's working