bug fix for TOC construction in cre.cpp

this fixes #456