diff --git a/pixel.cpp b/pixel.cpp
index 32f8bcf45e86963bbc1adbc0432cbe5c26503539..064cb7ae3341714f1035438f3e5fad077930a026 100644
--- a/pixel.cpp
+++ b/pixel.cpp
@@ -28,8 +28,9 @@ void pixel(
 		counter=0;
 
 	}
-	
+	else{
 	count++;
+	}
 	// 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)