Using only the code provided, I cannot reproduce the problem. On my XF 2.x forum, the second sample results in a page that shows both the TOC and the table. Is this the exact code that is failing, or is there other content on the page? Perhaps there is more required to reproduce the issue. You can send me the full BB-Code of any problematic page via PM.