diff --git a/CHANGELOG b/CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,8 @@
 # Changelog
 
+- 0.2.1 (2025-12-28)
+  * Adds an 'llvm' build flag and tests with GHC 9.10.3.
+
 - 0.2.0 (2025-06-21)
   * Both the ChaCha block function and stream cipher are now total,
     returning values of 'Left InvalidKey' or 'Left InvalidNonce' when
diff --git a/lib/Crypto/Cipher/ChaCha20.hs b/lib/Crypto/Cipher/ChaCha20.hs
--- a/lib/Crypto/Cipher/ChaCha20.hs
+++ b/lib/Crypto/Cipher/ChaCha20.hs
@@ -269,9 +269,10 @@
     PA.writePrimArray s idx (iv + sv)
   serialize state
 
+-- | Error values.
 data Error =
-    InvalidKey
-  | InvalidNonce
+    InvalidKey   -- ^ the provided key was not 256 bits long
+  | InvalidNonce -- ^ the provided nonce was none 96 bits long
   deriving (Eq, Show)
 
 -- RFC8439 2.3
@@ -359,8 +360,8 @@
   state@(ChaCha s) <- _chacha_alloc
 
   let loop acc !j bs = case BS.splitAt 64 bs of
-        (chunk@(BI.PS _ _ l), etc)
-          | l == 0 && BS.length etc == 0 -> pure $ -- XX
+        (chunk@(BI.PS _ _ l), etc@(BI.PS _ _ le))
+          | l == 0 && le == 0 -> pure $
               BS.toStrict (BSB.toLazyByteString acc)
           | otherwise -> do
               PA.copyMutablePrimArray s 0 initial 0 16
diff --git a/ppad-chacha.cabal b/ppad-chacha.cabal
--- a/ppad-chacha.cabal
+++ b/ppad-chacha.cabal
@@ -1,6 +1,6 @@
 cabal-version:      3.0
 name:               ppad-chacha
-version:            0.2.0
+version:            0.2.1
 synopsis:           A pure ChaCha20 stream cipher
 license:            MIT
 license-file:       LICENSE
@@ -8,11 +8,16 @@
 maintainer:         jared@ppad.tech
 category:           Cryptography
 build-type:         Simple
-tested-with:        GHC == 9.8.1
+tested-with:        GHC == 9.10.3
 extra-doc-files:    CHANGELOG
 description:
   A pure ChaCha20 stream cipher and block function.
 
+flag llvm
+  description: Use GHC's LLVM backend.
+  default:     False
+  manual:      True
+
 source-repository head
   type:     git
   location: git.ppad.tech/chacha.git
@@ -22,6 +27,8 @@
   hs-source-dirs:   lib
   ghc-options:
       -Wall
+  if flag(llvm)
+    ghc-options: -fllvm -O2
   exposed-modules:
       Crypto.Cipher.ChaCha20
   build-depends:
