Handle body class change on thread change at one place