TOC creation in script fixed.