diff --git a/dune/gfe/rotation.hh b/dune/gfe/rotation.hh
index b1d8ec3a2bd0eb3c5706b4d84b338768bddf0111..dd038f071a80bbc921ea7edadc18af939962d716 100644
--- a/dune/gfe/rotation.hh
+++ b/dune/gfe/rotation.hh
@@ -531,6 +531,8 @@ public:
 
         // Make sure we do the right thing if a and b are not in the same sheet
         // of the double covering of the unit quaternions over SO(3)
+        T dist = 2*std::acos( std::min(diff[3],1.0) );
+
         if (dist>=M_PI)
             diff *= -1;