Apply correct class to tabs. Fixes #2222.