diff --git a/Crypto/Cipher/Types/BlockIO.hs b/Crypto/Cipher/Types/BlockIO.hs
--- a/Crypto/Cipher/Types/BlockIO.hs
+++ b/Crypto/Cipher/Types/BlockIO.hs
@@ -154,7 +154,7 @@
   where wrap bs fakeIv d s = do
             fSrc <- newForeignPtr_ s
             let res = f (B.fromForeignPtr fSrc 0 bs)
-            withBytePtr res $ \r -> B.memcpy d r bs
+            withBytePtr res $ \r -> B.memcpy d r (fromIntegral bs)
             return fakeIv
 
 loopBS :: BlockCipherIO cipher
diff --git a/crypto-cipher-types.cabal b/crypto-cipher-types.cabal
--- a/crypto-cipher-types.cabal
+++ b/crypto-cipher-types.cabal
@@ -1,5 +1,5 @@
 Name:                crypto-cipher-types
-Version:             0.0.8
+Version:             0.0.9
 Synopsis:            Generic cryptography cipher types
 Description:         Generic cryptography cipher types
 License:             BSD3
