bug fixes and TOC tweaks