Corrected bad fix in graph generation code