FIX: Add TOC to the html list in the end + robust checking for render_trans