Some bug fixes to make the ncx and xhtml toc files work together