fix a few bugs introduced during localization work