fix crash in english prefs. cleanup code styling.