Fix bug in line drawing.