Fixed nested entities serialization issue.