proper TOC handling - thanks @dcorrigan!