Fixed bug in graph