Fix for writing locales to incorrect location #5