bug fix on graph