fixed xref table issues, minor bugfix