fixed line drawing bug