before change theme