fixes multi-level nesting with multiple new nested objects
Merge pull request #3 from serggl/bugfix

Fixes multi-level nesting with multiple new nested objects.