fix broken line ends
fix broken xref (which needed to be an x:ref)