better locale error-handling