Sometimes when custom theme is used exception is thrown. Workaround: Switch to control default before switching to custom theme.