Fixing the table of contents generation, since the structure of the tree has changed