diff --git a/Data/ByteArray/Bytes.hs b/Data/ByteArray/Bytes.hs
--- a/Data/ByteArray/Bytes.hs
+++ b/Data/ByteArray/Bytes.hs
@@ -124,7 +124,7 @@
                     (# s'', e2 #) ->
                         if booleanPrim (eqWord# e1 e2)
                             then loop (i +# 1#) s''
-                            else (# s', False #)
+                            else (# s'', False #)
     {-# INLINE loop #-}
 
 bytesCompare :: Bytes -> Bytes -> Ordering
diff --git a/Data/ByteArray/Mapping.hs b/Data/ByteArray/Mapping.hs
--- a/Data/ByteArray/Mapping.hs
+++ b/Data/ByteArray/Mapping.hs
@@ -13,7 +13,6 @@
     , mapAsWord128
     ) where
 
-import           Data.Bits (shiftR)
 import           Data.ByteArray.Types
 import           Data.ByteArray.Methods
 import           Data.Memory.Internal.Compat
diff --git a/memory.cabal b/memory.cabal
--- a/memory.cabal
+++ b/memory.cabal
@@ -1,5 +1,5 @@
 Name:                memory
-version:             0.14.6
+version:             0.14.7
 Synopsis:            memory and related abstraction stuff
 Description:
     Chunk of memory, polymorphic byte array management and manipulation
@@ -25,7 +25,7 @@
 Build-Type:          Simple
 Homepage:            https://github.com/vincenthz/hs-memory
 Bug-Reports:         https://github.com/vincenthz/hs-memory/issues
-Cabal-Version:       >=1.10
+Cabal-Version:       >=1.18
 extra-doc-files:     README.md CHANGELOG.md
 
 source-repository head
