diff --git a/tests/testSymmetry.c b/tests/testSymmetry.c
index 1f0849bb9093948fa68d88984c285c44b403ba79..eb20c84ec8d38cd52eff10a316383a8797a8c6c0 100644
--- a/tests/testSymmetry.c
+++ b/tests/testSymmetry.c
@@ -55,8 +55,8 @@ void test(void) {
   }
 
   /* Make the particle smoothing length and position reasonable */
-  for (size_t i = 0; i < 3; ++i) pi.x[0] = random_uniform(-1., 1.);
-  for (size_t i = 0; i < 3; ++i) pj.x[0] = random_uniform(-1., 1.);
+  for (size_t i = 0; i < 3; ++i) pi.x[i] = random_uniform(-1., 1.);
+  for (size_t i = 0; i < 3; ++i) pj.x[i] = random_uniform(-1., 1.);
   pi.h = 2.f;
   pj.h = 2.f;
   pi.id = 1ll;