diff --git a/bin/smartdata/Backend.php b/bin/smartdata/Backend.php
index b2a0300cfb94f2a0a4efe5c321d8cb04e0ab0963..36ad75a9dde21dd43ba54e126fe588f69a4433b8 100644
--- a/bin/smartdata/Backend.php
+++ b/bin/smartdata/Backend.php
@@ -3145,7 +3145,7 @@ class Backend_V1_1 extends Backend_Common
                     }
                     if($is_digital and ($series->type != 'TTH')){
                         $value_blob = $entry->get('value')->toBinaryString();
-                        switch ($type) {
+                        switch ($series->type) {
                             case Unit::I32:
                                 $value = Unpack::uInt32($value_blob);
                                 break;
diff --git a/bin/smartdata/Series.php b/bin/smartdata/Series.php
index 54a9135da3e9cabb67b8f244aa5e8e93286cd0f5..f8e2cb190cece975363d52bcc80faa1d12e6c74b 100644
--- a/bin/smartdata/Series.php
+++ b/bin/smartdata/Series.php
@@ -183,9 +183,9 @@ class Series
       $sd   = new self(
                 $json->version,
                 $json->unit??0,
-                $json->x,
-                $json->y,
-                $json->z,
+                $json->x ?? 0,
+                $json->y ?? 0,
+                $json->z ?? 0,
                 $json->r ?? 0,
                 $json->t0 ?? 0,
                 $json->t1 ?? ($json->tf ?? 0),