Fix graph bug