some refactoring
fix error when save unresolved dictionary