diff --git a/src/localgeodesicfestiffness.hh b/src/localgeodesicfestiffness.hh
index 198b052eb0a6495b3b71ff86fd9b847d907ef8da..09e792078ed90da60c19cc5ee52897bbc5000ff7 100644
--- a/src/localgeodesicfestiffness.hh
+++ b/src/localgeodesicfestiffness.hh
@@ -15,7 +15,7 @@ class LocalGeodesicFEStiffness
 
     // grid types
     typedef typename GridView::Grid::ctype DT;
-    typedef double RT;
+    typedef typename TargetSpace::ctype RT;
     typedef typename GridView::template Codim<0>::Entity Entity;
     
     // some other sizes