diff --git a/src/plugins/dive/self.ml b/src/plugins/dive/self.ml
index 87adec5f7ee6b7efe140527814e6e1a0e39cb820..3c1c7e782b26d050be116d587c0da039a11206a4 100644
--- a/src/plugins/dive/self.ml
+++ b/src/plugins/dive/self.ml
@@ -77,7 +77,7 @@ struct
       try
         Globals.Vars.find_from_astinfo name VGlobal
       with Not_found ->
-        raise (Cannot_build ("no global variable '" ^ name ^ "'"))
+        raise (Cannot_build ("no global variable '" ^ s ^ "'"))
 
   let to_string vi =
     match Kernel_function.find_defining_kf vi with