some fixes on localization layer