Fixing settings variable in toc