Hello
most functions needs that the shapes have transformation applied to works correctly.
select the line and use Edit/transform/apply transformation
If you want that transformations are automatically applied, set the " Auto-Apply Transformations " property to true in the Options.
++
David