diff --git a/crf-chain1-constrained.cabal b/crf-chain1-constrained.cabal
--- a/crf-chain1-constrained.cabal
+++ b/crf-chain1-constrained.cabal
@@ -1,5 +1,5 @@
 name:               crf-chain1-constrained
-version:            0.3.1
+version:            0.3.2
 synopsis:           First-order, constrained, linear-chain conditional random fields
 description:
     The library provides efficient implementation of the first-order,
@@ -42,7 +42,7 @@
       , array
       , random
       , parallel
-      , logfloat
+      , logfloat            >= 0.12.1   && < 0.14
       , monad-codec         >= 0.2      && < 0.3
       , binary
       , vector-binary
diff --git a/src/Data/CRF/Chain1/Constrained/Model.hs b/src/Data/CRF/Chain1/Constrained/Model.hs
--- a/src/Data/CRF/Chain1/Constrained/Model.hs
+++ b/src/Data/CRF/Chain1/Constrained/Model.hs
@@ -39,6 +39,7 @@
 import qualified Data.CRF.Chain1.Constrained.Dataset.Internal as A
 
 -- | A feature index.  To every model feature a unique index is assigned.
+-- It is equall to -1 if there is no corresponding feature in the model.
 newtype FeatIx = FeatIx { unFeatIx :: Int }
     deriving ( Show, Eq, Ord, Binary )
 derivingUnbox "FeatIx" [t| FeatIx -> Int |] [| unFeatIx |] [| FeatIx |]
@@ -204,8 +205,7 @@
 sgValue :: Model -> Lb -> L.LogFloat
 sgValue crf (Lb x) = 
     case unFeatIx (sgIxsV crf U.! x) of
-        -- TODO: Is the value correct?
-        -1 -> L.logToLogFloat (0 :: Float)
+        -1 -> L.logToLogFloat (0 :: Double)
         ix -> L.logToLogFloat (values crf U.! ix)
 
 -- | List of labels which can be located on the first position of
