fixed the bug with getting the wrong locale