Fixes for theme switching.