Fix bug on redraw graph