Fix minor bugs with localization