bug fix in graphs