fixed bug for collinear line segments