fixed a localization problem. Closes #1186