diff --git a/src/narrowphase/gjk.cpp b/src/narrowphase/gjk.cpp
index 5537653fae5315aaf9978d30e1019df08a24c446..fb4b1794ac19e9e0b612135f63c6a4a1ceba02b6 100644
--- a/src/narrowphase/gjk.cpp
+++ b/src/narrowphase/gjk.cpp
@@ -1261,7 +1261,7 @@ bool EPA::expand(size_t pass, SimplexV* w, SimplexF* f, size_t e, SimplexHorizon
   const size_t e1 = nexti[e];
     
   // case 1: the new face is not degenerated, i.e., the new face is not coplanar with the old face f.
-  if(f->n.dot(w->w) - f->d < -tolerance)
+  if(f->n.dot(w->w - f->vertex[e]->w) < -tolerance)
   {
     SimplexF* nf = newFace(f->vertex[e1], f->vertex[e], w, false);
     if(nf)