diff --git a/pixel.cpp b/pixel.cpp
index 76aa3c90043e8bcfd64d487c84e7a88bdec00c8b..91715dfebb25ddfc99f0e21a0edad72988024fb8 100644
--- a/pixel.cpp
+++ b/pixel.cpp
@@ -44,6 +44,7 @@ void pixel(
 		count_streams = 0;
 		flag = false;
 		p_count=3;
+		count = 0;
 	}
 
 	// pending: have to make count=0 when TLAST signal is active -  for w not in the range of 0 to n(size of the array)