repair the graph