fixed bug when switching themes on non-index pages after table is loaded