Fixed bug in TOC activate

Bug was reported in LaTeX-Box-Team/LaTeX-Box#165.