Minor refactoring on settings changed.