Fix a bug in setCheckedLocales