Graph generation fix

the graph wasn't properly affected in the constructor