toc: fixing ref toc printing