diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
 # Revision history for cabal-plan-bounds
 
+## 0.1.5.1 -- 2023-10-31
+
+* GHC-9.8 support
+
 ## 0.1.5 -- 2023-08-17
 
 * Strip patch-level from version numbers
diff --git a/cabal-plan-bounds.cabal b/cabal-plan-bounds.cabal
--- a/cabal-plan-bounds.cabal
+++ b/cabal-plan-bounds.cabal
@@ -1,6 +1,6 @@
 cabal-version:      3.0
 name:               cabal-plan-bounds
-version:            0.1.5
+version:            0.1.5.1
 synopsis:           Derives cabal bounds from build plans
 description:
   Manually curated dependency version ranges tend to become a lie: They likely
@@ -31,10 +31,10 @@
     import:           warnings
     main-is:          cabal-plan-bounds.hs
     other-modules:    ReplaceDependencies
-    build-depends:    base ^>=4.14.3 || ^>=4.15.1 || ^>=4.16.3 || ^>=4.17.0 || ^>=4.18.0,
+    build-depends:    base ^>=4.14.3 || ^>=4.15.1 || ^>=4.16.3 || ^>=4.17.0 || ^>=4.18.0 || ^>=4.19.0,
                       bytestring ^>=0.10.12 || ^>=0.11.3 || ^>=0.12.0,
                       containers ^>=0.6.4,
-                      text ^>=1.2.4 || ^>=2.0.1,
+                      text ^>=1.2.4 || ^>=2.0.1 || ^>=2.1,
                       Cabal-syntax ^>=3.8.1 || ^>=3.10.1,
                       cabal-plan ^>=0.7.2,
                       optparse-applicative ^>=0.17.0 || ^>=0.18.1,
diff --git a/src/ReplaceDependencies.hs b/src/ReplaceDependencies.hs
--- a/src/ReplaceDependencies.hs
+++ b/src/ReplaceDependencies.hs
@@ -105,7 +105,8 @@
             | otherwise = error $ "Field value out of order"
           where
             isHere (fl, _) = C.positionRow (C.fieldLineAnn fl) == i
-            r = C.positionRow (C.fieldLineAnn (fst (head ss)))
+            (fl0,_):_ = ss
+            r = C.positionRow (C.fieldLineAnn fl0)
 
 
         unchanged ls =  [ ([], l) | l <- ls ]
