diff --git a/src/main/java/caosdb/server/database/backend/transaction/RetrieveFullEntity.java b/src/main/java/caosdb/server/database/backend/transaction/RetrieveFullEntity.java
index a797807cad58295186b3bbedc5b30699f950e546..ad0d39e94b56904def08a04a8a42a89627a7b4d6 100644
--- a/src/main/java/caosdb/server/database/backend/transaction/RetrieveFullEntity.java
+++ b/src/main/java/caosdb/server/database/backend/transaction/RetrieveFullEntity.java
@@ -144,7 +144,7 @@ public class RetrieveFullEntity extends BackendTransaction {
               RetrieveEntity ref = new RetrieveEntity(value.getId());
               // recursion!  (Only for the matching selections)
               retrieveFullEntity(ref, getSubSelects(selections, propertyName));
-              value.setEntity(ref);
+              value.setEntity(ref, true);
             }
           }
         }
diff --git a/src/main/java/caosdb/server/entity/EntityInterface.java b/src/main/java/caosdb/server/entity/EntityInterface.java
index a666c9686eeb8bd40484662edc0872dc5e07456d..4205111a58c30185d916c1d921acb7470d93f7a9 100644
--- a/src/main/java/caosdb/server/entity/EntityInterface.java
+++ b/src/main/java/caosdb/server/entity/EntityInterface.java
@@ -1,25 +1,25 @@
 /*
-* ** header v3.0
-* This file is a part of the CaosDB Project.
-*
-* Copyright (C) 2018 Research Group Biomedical Physics,
-* Max-Planck-Institute for Dynamics and Self-Organization Göttingen
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Affero General Public License as
-* published by the Free Software Foundation, either version 3 of the
-* License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU Affero General Public License for more details.
-*
-* You should have received a copy of the GNU Affero General Public License
-* along with this program. If not, see <https://www.gnu.org/licenses/>.
-*
-* ** end header
-*/
+ * ** header v3.0
+ * This file is a part of the CaosDB Project.
+ *
+ * Copyright (C) 2018 Research Group Biomedical Physics,
+ * Max-Planck-Institute for Dynamics and Self-Organization Göttingen
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * ** end header
+ */
 package caosdb.server.entity;
 
 import caosdb.server.database.proto.SparseEntity;
diff --git a/src/main/java/caosdb/server/entity/wrapper/EntityWrapper.java b/src/main/java/caosdb/server/entity/wrapper/EntityWrapper.java
index 589fe937db6df73eb0a64945a03224542eafbea6..f8d563de1776d155b2f66b913de454c7e5b952fd 100644
--- a/src/main/java/caosdb/server/entity/wrapper/EntityWrapper.java
+++ b/src/main/java/caosdb/server/entity/wrapper/EntityWrapper.java
@@ -574,6 +574,7 @@ public class EntityWrapper implements EntityInterface {
   @Override
   public String getIdVersion() {
     return this.entity.getIdVersion();
+  }
 
   @Override
   public void addToElement(Element element, SetFieldStrategy strategy) {
diff --git a/src/test/java/caosdb/server/entity/xml/PropertyToElementStrategyTest.java b/src/test/java/caosdb/server/entity/xml/PropertyToElementStrategyTest.java
index 7e0feec8915283170b2964420d3ef1f6a42c0031..0d60ebd70feebe2e8e8810f296908e8b3a74100e 100644
--- a/src/test/java/caosdb/server/entity/xml/PropertyToElementStrategyTest.java
+++ b/src/test/java/caosdb/server/entity/xml/PropertyToElementStrategyTest.java
@@ -89,7 +89,7 @@ public class PropertyToElementStrategyTest {
     PropertyToElementStrategy strategy = new PropertyToElementStrategy();
     SetFieldStrategy setFieldStrategy = new SetFieldStrategy().addSelection(parse("height"));
     EntityInterface property = windowProperty;
-    ((ReferenceValue) property.getValue()).setEntity(window);
+    ((ReferenceValue) property.getValue()).setEntity(window, true);
     Element element = strategy.toElement(property, setFieldStrategy);
     assertEquals("Property", element.getName());
     assertEquals("2345", element.getAttributeValue("id"));