Fixed bug on settings change