Bugfix when localization is changed dynamically