BeginInit/EndInit breaks sometimes theme change