fix toc1 generation (thanks to ShaKeSPeaR)