fixing bug in localization subsystem