Fix a bug in locale selection.
Fix whitespace.