diff --git a/src/cache.h b/src/cache.h
index db85216b7d59cc82d2e23cae95c752d2be290378..6af5ce2871d5118b8a11f0c8d62fd88e0417e5e3 100644
--- a/src/cache.h
+++ b/src/cache.h
@@ -172,11 +172,6 @@ __attribute__((always_inline)) INLINE void cache_read_particles(
     ci_cache->vz[i] = ci->parts[i].v[2];
   }
 
-  /* Pad cache with fake particles that exist outside the cell so will not interact.*/
-  float fake_pix = 2.0f * ci->width[0] * ci->parts[ci->count - 1].x[0];
-  for (int i = ci->count; i < ci->count + (2 * VEC_SIZE); i++)
-    ci_cache->x[i] = fake_pix;
-
 #endif
 }
 
diff --git a/src/runner_doiact_vec.c b/src/runner_doiact_vec.c
index c29de502c4732797d594fc2ad385fdff292b5585..845b1b15c02fb548ed7aebb8a5de64fd796f5d41 100644
--- a/src/runner_doiact_vec.c
+++ b/src/runner_doiact_vec.c
@@ -445,6 +445,14 @@ __attribute__((always_inline)) INLINE void runner_doself1_density_vec(
       int pad = (num_vec_proc * VEC_SIZE) - rem;
 
       count_align += pad;
+
+      /* Set positions to the same as particle pi so when the r2 > 0 mask is
+       * applied these extra contributions are masked out.*/
+      for (int i = count; i < count_align; i++) {
+        cell_cache->x[i] = pix.f[0];
+        cell_cache->y[i] = piy.f[0];
+        cell_cache->z[i] = piz.f[0];
+      }
     }
 
     vector pjx, pjy, pjz;