Fixed locale bugs.