Bug fix in graphs