added check for locale not being set in model