Better update of graph on changes