diff --git a/Hipmunk.cabal b/Hipmunk.cabal
--- a/Hipmunk.cabal
+++ b/Hipmunk.cabal
@@ -3,7 +3,7 @@
 Tested-With:   GHC
 Category:      Physics, Game
 Name:          Hipmunk
-Version:       5.2.0.8
+Version:       5.2.0.9
 Stability:     provisional
 License:       OtherLicense
 License-File:  LICENSE
@@ -19,6 +19,11 @@
       all of its functions. It is completely self-contained.
       Please see <http://hackage.haskell.org/package/HipmunkPlayground>
       for a demonstration of this library.
+      .
+      New in version 5.2.0.9:
+      .
+      * Added Physics.Hipmunk.Constraint.setMaxBias and setMaxForce.
+        Thanks to Stephen Paul Weber.
       .
       New in version 5.2.0.6:
       .
diff --git a/Physics/Hipmunk/Callbacks.hsc b/Physics/Hipmunk/Callbacks.hsc
--- a/Physics/Hipmunk/Callbacks.hsc
+++ b/Physics/Hipmunk/Callbacks.hsc
@@ -74,7 +74,7 @@
 import Data.IORef
 import qualified Data.Map as M
 import Foreign hiding (new)
-import Foreign.C.Types (CInt)
+import Foreign.C.Types (CInt(..))
 #include "wrapper.h"
 
 import Physics.Hipmunk.Common
diff --git a/Physics/Hipmunk/Constraint.hsc b/Physics/Hipmunk/Constraint.hsc
--- a/Physics/Hipmunk/Constraint.hsc
+++ b/Physics/Hipmunk/Constraint.hsc
@@ -18,6 +18,8 @@
      newConstraint,
      redefineC,
      setBiasCoefC,
+     setMaxBias,
+     setMaxForce,
      -- ** Forgetting the phantom type
      -- $phantom
      Unknown,
@@ -105,6 +107,12 @@
 --   'setConstraintBiasCoef', which initially is @0.1@
 setBiasCoefC :: BiasCoef -> Constraint a -> IO ()
 setBiasCoefC b (C c _ _) = withForeignPtr c $ flip #{poke cpConstraint, biasCoef} b
+
+setMaxBias :: CpFloat -> Constraint a -> IO ()
+setMaxBias b (C c _ _) = withForeignPtr c $ flip #{poke cpConstraint, maxBias} b
+
+setMaxForce :: CpFloat -> Constraint a -> IO ()
+setMaxForce b (C c _ _) = withForeignPtr c $ flip #{poke cpConstraint, maxForce} b
 
 -- $phantom
 --   These functions discard the phantom type of the constraint.
diff --git a/Physics/Hipmunk/Space.hsc b/Physics/Hipmunk/Space.hsc
--- a/Physics/Hipmunk/Space.hsc
+++ b/Physics/Hipmunk/Space.hsc
@@ -62,7 +62,8 @@
 import Data.IORef
 import Data.StateVar
 import Foreign hiding (new)
-import Foreign.C.Types (CInt)
+import qualified Foreign.ForeignPtr.Unsafe
+import Foreign.C.Types (CInt(..))
 #include "wrapper.h"
 
 import Physics.Hipmunk.Common
@@ -171,7 +172,8 @@
 spaceAddHelper get_ add toShape =
     \(P sp entities _) new_c ->
         let new  = get_ new_c
-            key  = unsafeForeignPtrToPtr $ castForeignPtr new
+            key  = Foreign.ForeignPtr.Unsafe.unsafeForeignPtrToPtr $
+                        castForeignPtr new
             val  = case toShape new_c of
                      Just shape -> Right shape
                      Nothing    -> Left (castForeignPtr new)
@@ -186,7 +188,8 @@
 spaceRemoveHelper get_ remove =
     \(P sp entities _) old_c -> do
       let old  = get_ old_c
-          key  = unsafeForeignPtrToPtr $ castForeignPtr old
+          key  = Foreign.ForeignPtr.Unsafe.unsafeForeignPtrToPtr $
+                        castForeignPtr old
       modifyIORef' entities (M.delete key)
       withForeignPtr sp $ \sp_ptr ->
         withForeignPtr old $ \old_ptr ->
