Fixed issue with nested object serialization