diff --git a/Data/RAList.hs b/Data/RAList.hs
--- a/Data/RAList.hs
+++ b/Data/RAList.hs
@@ -488,7 +488,7 @@
 splitTree :: Word64 -> Word64 -> Tree a -> Top a -> Top a
 splitTree n treeSize tree@(Node _ l r) xs =
     case (compare n  1, n <= halfTreeSize) of
-      (GT {- n==0 -}, _ )  -> Cons treeSize tree xs
+      (LT {- n==0 -}, _ )  -> Cons treeSize tree xs
       (EQ {- n==1 -}, _ ) -> Cons halfTreeSize l (Cons halfTreeSize r xs)
       (_, True ) -> splitTree (n-1) halfTreeSize l (Cons halfTreeSize r xs)
       (_, False) -> splitTree (n-halfTreeSize-1) halfTreeSize r xs
diff --git a/ralist.cabal b/ralist.cabal
--- a/ralist.cabal
+++ b/ralist.cabal
@@ -1,7 +1,8 @@
+Cabal-Version:  2.2
 Name:           ralist
-Cabal-Version:  >= 1.20
-Version:        0.2.1.0
-License:        BSD3
+Version:        0.2.1.1
+License:        BSD-3-Clause
+license-file: LICENSE
 Author:         Lennart Augustsson, Carter Schonwald
 Maintainer:     Carter Schonwald
 Category:       Data Structures
@@ -23,11 +24,8 @@
   location: https://github.com/cartazio/ralist.git
 
 
--- You can disable the hunit test suite with -f-test-hunit
-flag test-hspec
-  default: True
-  manual: True
 
+
 Library
   Build-Depends: base >= 3 && < 6
   Exposed-modules:      Data.RAList
@@ -48,13 +46,11 @@
   ghc-options: -w -threaded -rtsopts -with-rtsopts=-N
   hs-source-dirs: tests
 
-  if !flag(test-hspec)
-    buildable: False
-  else
-    build-depends:
+
+  build-depends:
       base,
       ralist,
-      hspec >= 2.2 && < 2.3
+      hspec >= 2.2 && < 2.7
 
 
 benchmark benchmarking
