Fix a few problems with the TableOfContents