diff --git a/IPOS.py b/IPOS.py
index 4cdf65ef1a2aaaf640a3567ec0b7e0cb26719159..24014c6bf687d216a77968f00106aa0d836d0346 100644
--- a/IPOS.py
+++ b/IPOS.py
@@ -39,8 +39,9 @@ def read_serial(number):
         for x in range(number):
             line = ser.readline()   # read a '\n' terminated line
             print(line)
-            if(len(line)>30):
-                tag, distance = get_distance(line.decode("utf-8"))
+            line_decoded = line.decode("utf-8");
+            if(len(line_decoded)>=4):
+                tag, distance = get_distance(line_decoded);
                 print(tag, distance)
                 if (tag == "3383"):
                     d1.append(float(distance))