diff --git a/src/core/NEON/kernels/NEDirectConvolutionLayerOutputStageKernel.cpp b/src/core/NEON/kernels/NEDirectConvolutionLayerOutputStageKernel.cpp
index c022fa0..8c11574 100644
--- a/src/core/NEON/kernels/NEDirectConvolutionLayerOutputStageKernel.cpp
+++ b/src/core/NEON/kernels/NEDirectConvolutionLayerOutputStageKernel.cpp
@@ -110,7 +110,7 @@
     execute_window_loop(win, [&](const Coordinates & id)
     {
         int x = window_start_x;
-        for(; x < (window_end_x - window_step_x); x += window_step_x)
+        for(; x <= (window_end_x - window_step_x); x += window_step_x)
         {
             // Get bias and pointer to input
             const auto in_ptr = reinterpret_cast<const T *>(in.ptr()) + x;
@@ -175,7 +175,7 @@
     execute_window_loop(win, [&](const Coordinates &)
     {
         int x = window_start_x;
-        for(; x < (window_end_x - window_step_x); x += window_step_x)
+        for(; x <= (window_end_x - window_step_x); x += window_step_x)
         {
             // Get bias and pointer to input
             const auto in_ptr = reinterpret_cast<const T *>(in.ptr());
@@ -238,7 +238,7 @@
     {
 
         int x = window_start_x;
-        for(; x < (window_end_x - window_step_x); x += window_step_x)
+        for(; x <= (window_end_x - window_step_x); x += window_step_x)
         {
             // Get bias and pointer to input
             const auto  in_ptr = reinterpret_cast<int32_t *>(in.ptr()) + x;
@@ -323,7 +323,7 @@
     execute_window_loop(win, [&](const Coordinates &)
     {
         int x = window_start_x;
-        for(; x < (window_end_x - window_step_x); x += window_step_x)
+        for(; x <= (window_end_x - window_step_x); x += window_step_x)
         {
             // Get bias and pointer to input
             const auto  in_ptr = reinterpret_cast<int32_t *>(in.ptr()) + x;
diff --git a/src/core/NEON/kernels/NEGEMMLowpOffsetContributionKernel.cpp b/src/core/NEON/kernels/NEGEMMLowpOffsetContributionKernel.cpp
index 5710897..4ac33d1 100644
--- a/src/core/NEON/kernels/NEGEMMLowpOffsetContributionKernel.cpp
+++ b/src/core/NEON/kernels/NEGEMMLowpOffsetContributionKernel.cpp
@@ -139,7 +139,7 @@
             const int32x4_t b_offset_term_s32_vec = vdupq_n_s32(b_offset_term_s32);
 
             int x = window_start_x;
-            for(; x < (window_end_x - window_step_x); x += window_step_x)
+            for(; x <= (window_end_x - window_step_x); x += window_step_x)
             {
                 // Compute the leftover term due to a_offset.
                 int32x4x4_t a_offset_term_s32 =
@@ -237,7 +237,7 @@
             const int32x4_t b_offset_term_s32_vec = vdupq_n_s32(b_offset_term_s32);
 
             int x = window_start_x;
-            for(; x < (window_end_x - window_step_x); x += window_step_x)
+            for(; x <= (window_end_x - window_step_x); x += window_step_x)
             {
                 int32x4x4_t in_s32 =
                 {
@@ -291,7 +291,7 @@
             auto      mm_result_ptr      = reinterpret_cast<int32_t *>(mm_result_it.ptr());
 
             int x = window_start_x;
-            for(; x < (window_end_x - window_step_x); x += window_step_x)
+            for(; x <= (window_end_x - window_step_x); x += window_step_x)
             {
                 // Compute the leftover term due to a_offset.
                 int32x4x4_t a_offset_term_s32 =
diff --git a/src/core/NEON/kernels/NEPoolingLayerKernel.cpp b/src/core/NEON/kernels/NEPoolingLayerKernel.cpp
index 1310ef3..397eae9 100644
--- a/src/core/NEON/kernels/NEPoolingLayerKernel.cpp
+++ b/src/core/NEON/kernels/NEPoolingLayerKernel.cpp
@@ -1316,7 +1316,7 @@
                                  (_input->info()->strides_in_bytes().z());
 
         int x_off = window_start_x;
-        for(; x_off < (window_end_x - window_step_x); x_off += window_step_x)
+        for(; x_off <= (window_end_x - window_step_x); x_off += window_step_x)
         {
             const auto  in_x0_ptr = reinterpret_cast<const float16_t *>(input.ptr() + in_x0_offset) + x_off;
             const auto  in_x1_ptr = reinterpret_cast<const float16_t *>(input.ptr() + in_x1_offset) + x_off;
@@ -1432,7 +1432,7 @@
         const int pool_end_x   = std::min(pool_size_x, window_input.y().end() + pool_limit_x);
 
         int x_off = window_start_x;
-        for(; x_off < (window_end_x - window_step_x); x_off += window_step_x)
+        for(; x_off <= (window_end_x - window_step_x); x_off += window_step_x)
         {
             if(pooling_type != PoolingType::MAX)
             {
@@ -1943,7 +1943,7 @@
             const int pool_end_x   = std::min(pool_size_x, window_input.y().end() + pool_limit_x);
 
             int x_off = window_start_x;
-            for(; x_off < (window_end_x - window_step_x); x_off += window_step_x)
+            for(; x_off <= (window_end_x - window_step_x); x_off += window_step_x)
             {
                 if(pooling_type != PoolingType::MAX)
                 {
@@ -2113,7 +2113,7 @@
                                  (_input->info()->strides_in_bytes().z());
 
         int x_off = window_start_x;
-        for(; x_off < (window_end_x - window_step_x); x_off += window_step_x)
+        for(; x_off <= (window_end_x - window_step_x); x_off += window_step_x)
         {
             const auto in_x0_ptr = reinterpret_cast<const float *>(input.ptr() + in_x0_offset);
             const auto in_x1_ptr = reinterpret_cast<const float *>(input.ptr() + in_x1_offset);
@@ -2337,7 +2337,7 @@
         const int pool_end_x   = std::min(pool_size_x, window_input.y().end() + pool_limit_x);
 
         int x_off = window_start_x;
-        for(; x_off < (window_end_x - window_step_x); x_off += window_step_x)
+        for(; x_off <= (window_end_x - window_step_x); x_off += window_step_x)
         {
             if(pooling_type != PoolingType::MAX)
             {
