Fix TOC to work in frontend and show no preview in backend