updates selected properly; setupTOC rather hackish