diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,5 @@
+1.0.3 : Safety prevention for inlining and let-floating. 
+
 1.0.2 : Small improvements to documentation.
 
 1.0.1 : Added hashable as dependency. Version numbers now not stupid.
diff --git a/Data/HMap.hs b/Data/HMap.hs
--- a/Data/HMap.hs
+++ b/Data/HMap.hs
@@ -218,7 +218,8 @@
 -- @withKey f@ twice, that it will get a different key the second time.
 
 withKey :: (forall x. Key x a -> b) -> b
-withKey f = f $ Key $ unsafePerformIO newUnique
+withKey f = unsafePerformIO $ newUnique >>= \x -> return $ f $ Key x
+{-# NOINLINE withKey #-} 
 
 -- | The scope of top-level keys.
 data T 
diff --git a/HMap.cabal b/HMap.cabal
--- a/HMap.cabal
+++ b/HMap.cabal
@@ -1,5 +1,5 @@
 Name:                HMap
-Version:             1.0.2
+Version:             1.0.3
 Synopsis:	     Fast heterogeneous maps.
 Description:         Fast heterogeneous maps based on Hashmaps.
 License:             BSD3
