fix issues with saving nested objects
Merge pull request #223 from will123195/3.0

fix issues with saving nested objects