Fix setting locale before it's been generated