diff --git a/src/hnswutils.c b/src/hnswutils.c
index d6ed0b56..6b25eae8 100644
--- a/src/hnswutils.c
+++ b/src/hnswutils.c
@@ -966,7 +966,7 @@ LoadCandidates(char *base, IndexScanDesc scan, int ef)
 
 				/* Avoid any allocations if not adding */
 				eElement = NULL;
-				HnswLoadElementImpl(blkno, offno, &eDistance, &so->q, index, so->procinfo, so->collation, false, alwaysAdd ? NULL : &f->distance, &eElement);
+				HnswLoadElementImpl(blkno, offno, &eDistance, &so->q, index, so->procinfo, so->collation, false, NULL, &eElement);
 
 				if (eElement == NULL)
 					continue;
