diff --git a/src/runner_doiact_vec.c b/src/runner_doiact_vec.c
index 2fa6051892ef0d43c7b11f392d2650475375c71d..c429df0948f347bd312d4608f72b8e417da38e3c 100644
--- a/src/runner_doiact_vec.c
+++ b/src/runner_doiact_vec.c
@@ -363,7 +363,7 @@ __attribute__((always_inline)) INLINE static void storeForceInteractions(
 #if defined(HAVE_AVX2) || defined(HAVE_AVX512_F)
   /* Invert hj. */
   vector v_hj, v_hj_inv;
-  v_hj = vec_load(&cell_cache->h[pjd]);
+  v_hj.v = vec_load(&cell_cache->h[pjd]);
   v_hj_inv = vec_reciprocal(v_hj);
 
   mask_t packed_mask;
@@ -382,7 +382,7 @@ __attribute__((always_inline)) INLINE static void storeForceInteractions(
   VEC_LEFT_PACK(vec_load(&cell_cache->pOrho2[pjd]), packed_mask, &int_cache->pOrho2q[*icount]);
   VEC_LEFT_PACK(vec_load(&cell_cache->balsara[pjd]), packed_mask, &int_cache->balsaraq[*icount]);
   VEC_LEFT_PACK(vec_load(&cell_cache->soundspeed[pjd]), packed_mask, &int_cache->soundspeedq[*icount]);
-  VEC_LEFT_PACK(v_hj_inv->v, packed_mask, &int_cache->h_invq[*icount]);
+  VEC_LEFT_PACK(v_hj_inv.v, packed_mask, &int_cache->h_invq[*icount]);
   
   /* Increment interaction count by number of bits set in mask. */
   (*icount) += __builtin_popcount(mask);
diff --git a/src/vector.h b/src/vector.h
index d50bbd80e8dd23f2be06afcc4dca1545bed1e582..a7fd01ac59519ec98a2f37a0a9bde2eac2d58516 100644
--- a/src/vector.h
+++ b/src/vector.h
@@ -241,7 +241,7 @@
 
 /* Performs a left-pack on a vector based upon a mask and returns the result. */
 #define VEC_LEFT_PACK(a, mask, result) \
-  vec_unaligned_store(_mm256_permutevar8x32_ps(a, mask), result)
+  vec_unaligned_store(_mm256_permutevar8x32_ps(a, mask.m), result)
 #endif /* HAVE_AVX2 */
 
 /* Create an FMA using vec_add and vec_mul if AVX2 is not present. */