Fix for serializing EmbeddedDocuments