prevents line becoming polyline