Fixed serialisation for EmbeddedDocuments