Fix localization functions