Security fix for locale selection