fixed order for tableofcontents when clicking prev/clicking