Fix line drawing bug