diff --git a/restws.formats.inc b/restws.formats.inc
index a5243af..942694a 100644
--- a/restws.formats.inc
+++ b/restws.formats.inc
@@ -213,10 +213,10 @@ abstract class RestWSBaseFormat implements RestWSFormatInterface {
             $data[$name] = $this->getResourceReference($property->type(), $id);
           }
         }
-        elseif ($property instanceof EntityValueWrapper) {
+        elseif ($property instanceof EntityValueWrapper || $property instanceof EntityStructureWrapper) {
           $data[$name] = $property->value();
         }
-        elseif ($property instanceof EntityListWrapper || $property instanceof EntityStructureWrapper) {
+        elseif ($property instanceof EntityListWrapper) {
           $data[$name] = $this->getData($property);
         }
       }
