fixed bug where outside locales parameter would get modified