fix the graph bug