toc: fixing ordering problems