fix broken XML (dangling reference)