some fixes to cascading changes in counts and tests on toc.