Corrected minor bug in localization