Fix TOC generation