adjust sizing of table of contents to better display nested items, fix bug with display of final item in list