Adjust code for toc