fixes for toc extraction