Updated SettingsSync to take care of edge cases