diff --git a/pixel.cpp b/pixel.cpp
index 27d75edc9f292882bdb20e8181b302e6193def2e..f4ecc407428c8b964ae9e498b2ccc4f383f90be5 100644
--- a/pixel.cpp
+++ b/pixel.cpp
@@ -37,12 +37,12 @@ void pixel(
         charIn=toAscii((char)character);
     }
 
-    if((count_streams >= 3 * (position1 - 1)) && (count_streams < 3 * (position2))){
+    if((count_streams >= 3 * (position1 - 1)) && (count_streams < 3 * (position2))&& (charIn!=0)){
 
         addNum=charIn%10;
 		charIn=(int)charIn/10;
 
-        pkt.data=addNum;
+        pkt.data=charIn;
 
     }