fixed bug, when saving registries