diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
 # hw-rankselect
-[![v0.0-branch](https://circleci.com/gh/haskell-works/hw-rankselect/tree/v0.0-branch.svg?style=svg)](https://circleci.com/gh/haskell-works/hw-rankselect/tree/v0.0-branch)
+[![0.0-branch](https://circleci.com/gh/haskell-works/hw-rankselect/tree/0.0-branch.svg?style=svg)](https://circleci.com/gh/haskell-works/hw-rankselect/tree/0.0-branch)
 
 Rank and select operations.
diff --git a/hw-rankselect.cabal b/hw-rankselect.cabal
--- a/hw-rankselect.cabal
+++ b/hw-rankselect.cabal
@@ -1,5 +1,5 @@
 name:                   hw-rankselect
-version:                0.0.0.4
+version:                0.0.0.5
 synopsis:               Conduits for tokenizing streams.
 description:            Please see README.md
 homepage:               http://github.com/haskell-works/hw-rankselect#readme
@@ -11,13 +11,13 @@
 category:               Data, Conduit
 build-type:             Simple
 extra-source-files:     README.md
-cabal-version:          >= 1.10
+cabal-version:          >= 1.22
 
 executable hw-rankselect-example
   hs-source-dirs:       app
   main-is:              Main.hs
   ghc-options:          -threaded -rtsopts -with-rtsopts=-N -O2 -Wall -msse4.2
-  build-depends:        base            >= 4
+  build-depends:        base                          >= 4          && < 5
                       , hw-rankselect
   default-language:     Haskell2010
 
@@ -36,13 +36,13 @@
                       , HaskellWorks.Data.Succinct.RankSelect.Binary.Basic.Select1
                       , HaskellWorks.Data.Succinct.RankSelect.Binary.Poppy512
                       , HaskellWorks.Data.Succinct.RankSelect.Internal
-  build-depends:        base            >= 4    && < 5
+  build-depends:        base                          >= 4          && < 5
                       , hw-bits
-                      , hw-prim
+                      , hw-prim                       >= 0.0.3
                       , vector
 
   default-language:     Haskell2010
-  ghc-options:          -rtsopts -with-rtsopts=-N -Wall -O2 -Wall -msse4.2
+  ghc-options:          -Wall -O2 -msse4.2
 
 test-suite hw-rankselect-test
   type:                 exitcode-stdio-1.0
@@ -57,10 +57,10 @@
                       , HaskellWorks.Data.Succinct.RankSelect.Binary.Poppy512Spec
                       , HaskellWorks.Data.Succinct.RankSelect.InternalSpec
                       , HaskellWorks.Data.Succinct.SimpleSpec
-  build-depends:        base
+  build-depends:        base                          >= 4          && < 5
                       , hspec
                       , hw-bits
-                      , hw-prim
+                      , hw-prim                       >= 0.0.3
                       , hw-rankselect
                       , QuickCheck
                       , vector
@@ -77,11 +77,11 @@
     Main-Is: Main.hs
     GHC-Options: -O2 -Wall -msse4.2
     Default-Language: Haskell2010
-    Build-Depends:      base            >= 4    && < 5
+    Build-Depends:      base                          >= 4          && < 5
                       , bytestring
                       , conduit
                       , criterion
-                      , hw-prim
+                      , hw-prim                       >= 0.0.3
                       , hw-rankselect
                       , mmap
                       , vector
diff --git a/src/HaskellWorks/Data/Succinct/BalancedParens/Simple.hs b/src/HaskellWorks/Data/Succinct/BalancedParens/Simple.hs
--- a/src/HaskellWorks/Data/Succinct/BalancedParens/Simple.hs
+++ b/src/HaskellWorks/Data/Succinct/BalancedParens/Simple.hs
@@ -67,8 +67,8 @@
   findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
   enclose         = findOpen' (Count 1)
   firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
-  nextSibling v p = findClose v p >>= (\q -> if (p /= q) then return (q + 1) else Nothing)
-  parent      v p = enclose   v p >>= (\r -> if (r >= 1) then return r       else Nothing)
+  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
+  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
   {-# INLINABLE findOpen    #-}
   {-# INLINABLE findClose   #-}
   {-# INLINABLE enclose     #-}
@@ -81,8 +81,8 @@
   findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
   enclose         = findOpen' (Count 1)
   firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
-  nextSibling v p = findClose v p >>= (\q -> if (p /= q) then return (q + 1) else Nothing)
-  parent      v p = enclose   v p >>= (\r -> if (r >= 1) then return r       else Nothing)
+  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
+  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
   {-# INLINABLE findOpen    #-}
   {-# INLINABLE findClose   #-}
   {-# INLINABLE enclose     #-}
@@ -95,8 +95,8 @@
   findClose v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
   enclose       = findOpen' (Count 1)
   firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
-  nextSibling v p = findClose v p >>= (\q -> if (p /= q) then return (q + 1) else Nothing)
-  parent      v p = enclose   v p >>= (\r -> if (r >= 1) then return r       else Nothing)
+  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
+  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
   {-# INLINABLE findOpen    #-}
   {-# INLINABLE findClose   #-}
   {-# INLINABLE enclose     #-}
@@ -109,8 +109,8 @@
   findClose v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
   enclose       = findOpen' (Count 1)
   firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
-  nextSibling v p = findClose v p >>= (\q -> if (p /= q) then return (q + 1) else Nothing)
-  parent      v p = enclose   v p >>= (\r -> if (r >= 1) then return r       else Nothing)
+  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
+  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
   {-# INLINABLE findOpen    #-}
   {-# INLINABLE findClose   #-}
   {-# INLINABLE enclose     #-}
@@ -123,8 +123,8 @@
   findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
   enclose         = findOpen' (Count 1)
   firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
-  nextSibling v p = findClose v p >>= (\q -> if (p /= q) then return (q + 1) else Nothing)
-  parent      v p = enclose   v p >>= (\r -> if (r >= 1) then return r       else Nothing)
+  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
+  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
   {-# INLINABLE findOpen    #-}
   {-# INLINABLE findClose   #-}
   {-# INLINABLE enclose     #-}
@@ -137,8 +137,8 @@
   findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
   enclose         = findOpen' (Count 1)
   firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
-  nextSibling v p = findClose v p >>= (\q -> if (p /= q) then return (q + 1) else Nothing)
-  parent      v p = enclose   v p >>= (\r -> if (r >= 1) then return r       else Nothing)
+  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
+  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
   {-# INLINABLE findOpen    #-}
   {-# INLINABLE findClose   #-}
   {-# INLINABLE enclose     #-}
@@ -151,8 +151,8 @@
   findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
   enclose         = findOpen' (Count 1)
   firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
-  nextSibling v p = findClose v p >>= (\q -> if (p /= q) then return (q + 1) else Nothing)
-  parent      v p = enclose   v p >>= (\r -> if (r >= 1) then return r       else Nothing)
+  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
+  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
   {-# INLINABLE findOpen    #-}
   {-# INLINABLE findClose   #-}
   {-# INLINABLE enclose     #-}
@@ -165,8 +165,8 @@
   findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
   enclose         = findOpen' (Count 1)
   firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
-  nextSibling v p = findClose v p >>= (\q -> if (p /= q) then return (q + 1) else Nothing)
-  parent      v p = enclose   v p >>= (\r -> if (r >= 1) then return r       else Nothing)
+  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
+  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
   {-# INLINABLE findOpen    #-}
   {-# INLINABLE findClose   #-}
   {-# INLINABLE enclose     #-}
@@ -179,8 +179,8 @@
   findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
   enclose         = findOpen' (Count 1)
   firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
-  nextSibling v p = findClose v p >>= (\q -> if (p /= q) then return (q + 1) else Nothing)
-  parent      v p = enclose   v p >>= (\r -> if (r >= 1) then return r       else Nothing)
+  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
+  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
   {-# INLINABLE findOpen    #-}
   {-# INLINABLE findClose   #-}
   {-# INLINABLE enclose     #-}
