Fixing a bug with updating the graph selection.