fixed xref-related issues