Fixed graph redraw bug