Bug fix: corrected the way the locale is compared