diff --git a/restws.formats.inc b/restws.formats.inc
index fa6c7de..4296e8c 100644
--- a/restws.formats.inc
+++ b/restws.formats.inc
@@ -135,10 +135,10 @@ abstract class RestWSBaseFormat implements RestWSFormatInterface {
             $data[$name] = self::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] = self::getData($property);
         }
       }
