fix bug with localization