Fix graph initialization