fixes for my table of contents parser