diff --git a/lib/UESUpdateHelper.php b/lib/UESUpdateHelper.php
index 19ea1d636b988cccfaf38e15bc17c862ee486767..d6e7c4e777a7bb75b2c86d376ec4fc9564acb05f 100644
--- a/lib/UESUpdateHelper.php
+++ b/lib/UESUpdateHelper.php
@@ -154,18 +154,25 @@ class UESUpdateHelper
                 (self::isComplexType($attribute[self::TYPE]) ||
                   in_array($attrName, $serializedAttributes, true))
             ) {
-                $attr = in_array($attrName, $serializedAttributes, true) ?
-                    array_merge($attr, explode(';', $attribute[self::VALUE])) :
-                    array_merge($attr, $attribute[self::VALUE]);
+                if (
+                    strpos($attribute[self::TYPE], self::MAP_TYPE) ||
+                    !in_array($attrName, $serializedAttributes, true)
+                ) {
+                    $attr = array_merge($attr, $attribute[self::VALUE]);
+                } else {
+                    $attr = array_merge($attr, explode(';', $attribute[self::VALUE]));
+                }
             }
 
             if (self::isSimpleType($attribute[self::TYPE])) {
                 $newValue = self::convertToString($attr);
             } elseif (self::isComplexType($attribute[self::TYPE])) {
-                if (!empty($attr)) {
-                    $newValue = array_values(array_unique($attr));
-                } else {
+                if (empty($attr)) {
                     $newValue = [];
+                } elseif (strpos($attribute[self::TYPE], self::MAP_TYPE)) {
+                    $newValue = $attr;
+                } else {
+                    $newValue = array_values(array_unique($attr));
                 }
                 if (in_array($attrName, $serializedAttributes, true)) {
                     $newValue = self::convertToString($newValue);