fix the graph rendering