Fix graph reduction