diff --git a/src/distance_capsule_capsule.cpp b/src/distance_capsule_capsule.cpp
index cefea58a492343f634588cfd2586408cab896f8d..aa870d7ca640166229e54770aa06d6751d8d1d80 100644
--- a/src/distance_capsule_capsule.cpp
+++ b/src/distance_capsule_capsule.cpp
@@ -140,8 +140,8 @@ namespace fcl {
     }
 
     // witness points achieving the distance between the two segments
-    const Vec3f& w1 = p1 + s * d1;
-    const Vec3f& w2 = p2 + t * d2;
+    const Vec3f w1 = p1 + s * d1;
+    const Vec3f w2 = p2 + t * d2;
     FCL_REAL distance = (w1 - w2).norm();
     Vec3f normal = (w1 - w2) / distance;
     result.normal = normal;