bug fix: saving dictionary in the right way