diff --git a/pandoc-lua-engine.cabal b/pandoc-lua-engine.cabal
--- a/pandoc-lua-engine.cabal
+++ b/pandoc-lua-engine.cabal
@@ -1,6 +1,6 @@
 cabal-version:       2.4
 name:                pandoc-lua-engine
-version:             0.2.1.3
+version:             0.2.1.4
 build-type:          Simple
 license:             GPL-2.0-or-later
 license-file:        COPYING.md
@@ -117,7 +117,7 @@
                      , lpeg                  >= 1.1     && < 1.2
                      , mtl                   >= 2.2     && < 2.4
                      , pandoc                >= 3.1.4   && < 3.2
-                     , pandoc-lua-marshal    >= 0.2.2   && < 0.3
+                     , pandoc-lua-marshal    >= 0.2.6   && < 0.3
                      , pandoc-types          >= 1.22    && < 1.24
                      , parsec                >= 3.1     && < 3.2
                      , text                  >= 1.1.1   && < 2.2
diff --git a/src/Text/Pandoc/Lua/Marshal/PandocError.hs b/src/Text/Pandoc/Lua/Marshal/PandocError.hs
--- a/src/Text/Pandoc/Lua/Marshal/PandocError.hs
+++ b/src/Text/Pandoc/Lua/Marshal/PandocError.hs
@@ -23,7 +23,7 @@
 import Text.Pandoc.Error (PandocError (PandocLuaError), renderError)
 
 import qualified HsLua as Lua
-import qualified Text.Pandoc.UTF8 as UTF8
+import qualified HsLua.Core.Utf8 as UTF8
 
 -- | Lua userdata type definition for PandocError.
 typePandocError :: LuaError e => DocumentedType e PandocError
