fixing locale implementation