diff --git a/changelog.md b/changelog.md
--- a/changelog.md
+++ b/changelog.md
@@ -1,3 +1,7 @@
+0.1.4
+
+* support ghc-9.10
+
 0.1.3.1
 
 * add missing file in test suite
diff --git a/lib/Pdf/Document/Page.hs b/lib/Pdf/Document/Page.hs
--- a/lib/Pdf/Document/Page.hs
+++ b/lib/Pdf/Document/Page.hs
@@ -282,8 +282,8 @@
   . List.map spGlyphs
   where
   step acc [] = acc
-  step ((Vector lx2 ly2, wasSpace), res) sp =
-    let Vector x1 y1 = glyphTopLeft (head sp)
+  step ((Vector lx2 ly2, wasSpace), res) sp@(x : _) =
+    let Vector x1 y1 = glyphTopLeft x
         Vector x2 _ = glyphBottomRight (last sp)
         Vector _ y2 = glyphTopLeft (last sp)
         space =
diff --git a/pdf-toolbox-document.cabal b/pdf-toolbox-document.cabal
--- a/pdf-toolbox-document.cabal
+++ b/pdf-toolbox-document.cabal
@@ -1,5 +1,5 @@
 name:                pdf-toolbox-document
-version:             0.1.3.1
+version:             0.1.4
 synopsis:            A collection of tools for processing PDF files.
 license:             BSD3
 license-file:        LICENSE
