fixed bug where single child nodes with nested nodes are not serialized properly issue #2