diff --git a/applications/reconstruct/src/ilw/ilw.cu b/applications/reconstruct/src/ilw/ilw.cu
index a171d4889f8024d6efe912033bc52e72f4c11927..7c8cb7f3009187395628cc70811378e141a27195 100644
--- a/applications/reconstruct/src/ilw/ilw.cu
+++ b/applications/reconstruct/src/ilw/ilw.cu
@@ -182,7 +182,7 @@ __global__ void correspondence_energy_vector_kernel(
 		}
     }
 
-	const float avgweight = contrib/count;
+	const float avgweight = contrib/(float)count;
     const float confidence = bestweight - avgweight;
 
     if (contrib > 0.0f) {