diff --git a/Data/Text/ICU/Regex/Pure.hs b/Data/Text/ICU/Regex/Pure.hs
--- a/Data/Text/ICU/Regex/Pure.hs
+++ b/Data/Text/ICU/Regex/Pure.hs
@@ -130,7 +130,7 @@
 find re0 haystack = unsafePerformIO .
   matching re0 haystack $ \re -> do
     m <- IO.findNext re
-    return $! if m then Nothing else Just (Match re 0)
+    return $! if m then Just (Match re 0) else Nothing
 
 -- | Lazily find all matches for the regular expression in the given
 -- text.
@@ -216,6 +216,6 @@
 grouping n (Match m _) act = unsafePerformIO $ do
   count <- IO.groupCount m
   let n' = fromIntegral n
-  if n' == 0 || (n' >= 0 && n' < count)
+  if n' == 0 || (n' >= 0 && n' <= count)
     then Just `fmap` act m
     else return Nothing
diff --git a/text-icu.cabal b/text-icu.cabal
--- a/text-icu.cabal
+++ b/text-icu.cabal
@@ -1,5 +1,5 @@
 name:           text-icu
-version:        0.6.3.2
+version:        0.6.3.3
 synopsis:       Bindings to the ICU library
 homepage:       http://bitbucket.org/bos/text-icu
 bug-reports:    http://bitbucket.org/bos/text-icu/issues
