fix the getting of TOC references