fixed a bug in plan_line.c