diff --git a/sequor.cabal b/sequor.cabal
--- a/sequor.cabal
+++ b/sequor.cabal
@@ -1,5 +1,5 @@
 Name:                sequor
-Version:             0.3.0
+Version:             0.3.1
 Description:         A sequence labeler based on Collins's sequence perceptron.
 Synopsis:	     A sequence labeler based on Collins's sequence perceptron.
 Homepage:	     http://code.google.com/p/sequor/
diff --git a/src/Hashable.hs b/src/Hashable.hs
--- a/src/Hashable.hs
+++ b/src/Hashable.hs
@@ -37,13 +37,13 @@
     -- | The computed 'hash' value should be as collision-free as possible, the
     -- probability of @'hash' a == 'hash' b@ should ideally be 1 over the
     -- number of representable values in the result type.
-    hash :: Bits b => a -> b
+    hash :: (Num b, Bits b) => a -> b
 
 -- | Combines two given hash values.
-combine :: (Bits b) => b -> b -> b
+combine :: (Num b, Bits b) => b -> b -> b
 combine h1 h2 = (h1 + h1 `shiftL` 5) `xor` h2
 
-hashAndCombine :: (Bits b,Hashable h) => b -> h -> b
+hashAndCombine :: (Num b, Bits b, Hashable h) => b -> h -> b
 hashAndCombine acc h = acc `combine` hash h
 
 instance Hashable () where hash _ = 0
diff --git a/src/Perceptron/Sequence.hs b/src/Perceptron/Sequence.hs
--- a/src/Perceptron/Sequence.hs
+++ b/src/Perceptron/Sequence.hs
@@ -13,6 +13,7 @@
     )
 where
 
+import qualified Data.Array.Unsafe as AU
 import Data.Array.ST
 import Data.Array.Unboxed
 import qualified Data.Array as A
@@ -186,7 +187,7 @@
         -> ST s ()
 iter opts _ ss (c,params,params_a) = do
     for_ ss $ \ (x,y) -> do
-      params' <- unsafeFreeze params
+      params' <- AU.unsafeFreeze params
       let (y',phi_xy') = decode' opts (params'`dot`) x
       when (y' /= y) $ do 
         let phi_xy = phi opts x y 
@@ -211,8 +212,8 @@
     for_ [1..oEpochs opts] $ 
              \i -> do iter opts i ss (c,params,params_a)
                       c' <- readSTRef c
-                      params' <- unsafeFreeze params
-                      params_a' <- unsafeFreeze params_a
+                      params' <- AU.unsafeFreeze params
+                      params_a' <- AU.unsafeFreeze params_a
                       let w  = (fromIntegral c',params',params_a')
                           ys xys = [ fst . decode' opts (w`dot'`) $ x 
                                             | (x,_) <- xys ]
