diff --git a/asterix-app/src/test/resources/runtimets/queries/dml/opentype-o2o.aql b/asterix-app/src/test/resources/runtimets/queries/dml/opentype-o2o.aql
new file mode 100644
index 0000000..b2f6d14
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/dml/opentype-o2o.aql
@@ -0,0 +1,45 @@
+drop dataverse testdv2 if exists;
+create dataverse testdv2;
+use dataverse testdv2;
+
+create type testtype as open {
+  id: string,
+  name: string
+}
+
+create type testtype2 as open {
+  id: string,
+  name: string,
+  hobby: string
+}
+
+create dataset testds(testtype) partitioned by key id;
+
+create dataset testds2(testtype2) partitioned by key id;
+ 
+insert into dataset testds (
+{ "id": "001", "name": "Person Three", "hobby": "music"}
+);
+
+insert into dataset testds (
+{ "id": "002", "name": "Person Three", "hobby": "football", "city":"irvine"}
+);
+
+insert into dataset testds (
+{ "id": "003", "name": "Person Three", "hobby": "movie"}
+);
+
+insert into dataset testds (
+{ "id": "004", "name": "Person Three", "hobby": "swimming", "phone":"102-304-506"}
+);
+
+insert into dataset testds2 (
+ for $d in dataset("testds") 
+	return $d
+);
+
+write output to nc1:"rttest/dml_opentype-o2o.adm";
+
+for $d in dataset("testds2") 
+order by $d.id
+return $d
diff --git a/asterix-app/src/test/resources/runtimets/results/dml/opentype-o2o.adm b/asterix-app/src/test/resources/runtimets/results/dml/opentype-o2o.adm
new file mode 100644
index 0000000..f5a5985
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/dml/opentype-o2o.adm
@@ -0,0 +1,4 @@
+{ "id": "001", "name": "Person Three", "hobby": "music" }
+{ "id": "002", "name": "Person Three", "hobby": "football", "city": "irvine" }
+{ "id": "003", "name": "Person Three", "hobby": "movie" }
+{ "id": "004", "name": "Person Three", "hobby": "swimming", "phone": "102-304-506" }
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/util/ARecordAccessor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/util/ARecordAccessor.java
index f02ecee..9a048f5 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/util/ARecordAccessor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/util/ARecordAccessor.java
@@ -37,7 +37,7 @@
     private int offsetArrayOffset;
     private int[] fieldOffsets;
     private int fieldCursor = -1;
-    private ATypeTag typeTag = ATypeTag.ANY;
+    private ATypeTag typeTag;
     private SimpleValueReference nullReference = new SimpleValueReference();
 
     private byte[] data;
@@ -149,24 +149,23 @@
                         }
                     }
                     IAType[] fieldTypes = inputRecType.getFieldTypes();
-                    ATypeTag tag = ATypeTag.ANY;
                     int fieldValueLength = 0;
 
                     if (fieldTypes[fieldNumber].getTypeTag() == ATypeTag.UNION) {
                         if (NonTaggedFormatUtil.isOptionalField((AUnionType) fieldTypes[fieldNumber])) {
-                            tag = ((AUnionType) fieldTypes[fieldNumber]).getUnionList()
+                            typeTag = ((AUnionType) fieldTypes[fieldNumber]).getUnionList()
                                     .get(NonTaggedFormatUtil.OPTIONAL_TYPE_INDEX_IN_UNION_LIST).getTypeTag();
                             fieldValueLength = NonTaggedFormatUtil.getFieldValueLength(b, fieldOffsets[fieldNumber],
-                                    tag, false);
+                                    typeTag, false);
                         }
                     } else {
-                        tag = fieldTypes[fieldNumber].getTypeTag();
-                        fieldValueLength = NonTaggedFormatUtil.getFieldValueLength(b, fieldOffsets[fieldNumber], tag,
-                                false);
+                        typeTag = fieldTypes[fieldNumber].getTypeTag();
+                        fieldValueLength = NonTaggedFormatUtil.getFieldValueLength(b, fieldOffsets[fieldNumber],
+                                typeTag, false);
                     }
                     // set field value (including the type tag)
                     int fstart = dataBos.size();
-                    dataDos.writeByte(tag.serialize());
+                    dataDos.writeByte(typeTag.serialize());
                     dataDos.write(b, fieldOffsets[fieldNumber], fieldValueLength);
                     int fend = dataBos.size();
                     nextFieldValue().reset(dataBuffer, fstart, fend - fstart);
@@ -193,7 +192,7 @@
                     typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(b[fieldOffset]);
 
                     // set the field value (already including type tag)
-                    fieldValueLength = NonTaggedFormatUtil.getFieldValueLength(b, fieldOffset, typeTag, true);
+                    fieldValueLength = NonTaggedFormatUtil.getFieldValueLength(b, fieldOffset, typeTag, true) + 1;
                     nextFieldValue().reset(b, fieldOffset, fieldValueLength);
                     fieldOffset += fieldValueLength;
                 }
