diff --git a/src/cache.h b/src/cache.h
index 1b6d89f03fafa1595cb9bdf857c9f2bc1cba316e..3313cb41865c69d67921702603f33e3238f97efc 100644
--- a/src/cache.h
+++ b/src/cache.h
@@ -64,7 +64,7 @@ struct cache {
   float *restrict vz __attribute__((aligned(CACHE_ALIGN)));
 
   /* Maximum distance of particles into neighbouring cell. */
-  float *restrict max_d __attribute__((aligned(CACHE_ALIGN)));
+  int *restrict max_d __attribute__((aligned(CACHE_ALIGN)));
 
   /* Cache size. */
   int count;