Fix ToC generator to work with base