Join lines strange behaviour

This never happened to me, I think it is a tolerance issue but I cannot find where to fix it.
I have the highlighted single straight lines of picture 1 and when I join then, it makes it a closed polyline, changing the geometry (picture 2).
Any ideas?
Another issue: if I type the command first it does not allow me to select anything, I have type the command after selecting…
image image

Thanks, N

Hello- without a file it is hard to say but I would look at file tolerances first.
Or location - are these far from the world origin?

-Pascal