Improve active class tagging in tabs