updated to check if graph is updating.