diff --git a/cabal.project b/cabal.project
index 8a3643e28..543596442 100644
--- a/cabal.project
+++ b/cabal.project
@@ -3,8 +3,7 @@ tests: True
 flags: +embed_data_files
 constraints: aeson >= 2.0.1.0
 
-
--- source-repository-package
---   type: git
---   location: https://github.com/jgm/doclayout.git
---   tag: b274a5658f3655f31c0bc6175d5b27a9467c1456
+source-repository-package
+  type: git
+  location: https://github.com/jgm/citeproc
+  tag: 7874a4ccf1845e5a8a6855c251f1aaea9bf12807
diff --git a/src/Text/Pandoc/Citeproc/BibTeX.hs b/src/Text/Pandoc/Citeproc/BibTeX.hs
index 9d6b0b47e..5db99d66b 100644
--- a/src/Text/Pandoc/Citeproc/BibTeX.hs
+++ b/src/Text/Pandoc/Citeproc/BibTeX.hs
@@ -192,6 +192,7 @@ writeBibtexString opts variant mblang ref =
       Just t  -> t
       Nothing -> T.intercalate "/" (map renderDatePart (dateParts date)) <>
                     (if dateCirca date then "~" else mempty)
+  valToInlines SubstitutedVal = mempty
 
   renderDatePart (DateParts xs) = T.intercalate "-" $
                                     map (T.pack . printf "%02d") xs
diff --git a/src/Text/Pandoc/Citeproc/MetaValue.hs b/src/Text/Pandoc/Citeproc/MetaValue.hs
index b43ca7314..b4de79426 100644
--- a/src/Text/Pandoc/Citeproc/MetaValue.hs
+++ b/src/Text/Pandoc/Citeproc/MetaValue.hs
@@ -56,6 +56,7 @@ valToMetaValue (FancyVal ils) = MetaInlines (B.toList ils)
 valToMetaValue (NumVal n) = MetaString (T.pack $ show n)
 valToMetaValue (NamesVal ns) = MetaList $ map nameToMetaValue ns
 valToMetaValue (DateVal d) = dateToMetaValue d
+valToMetaValue _ = MetaString mempty
 
 nameToMetaValue :: Name -> MetaValue
 nameToMetaValue name =
diff --git a/src/Text/Pandoc/Lua/Marshal/Reference.hs b/src/Text/Pandoc/Lua/Marshal/Reference.hs
index 3bbc4082c..c23bfef9f 100644
--- a/src/Text/Pandoc/Lua/Marshal/Reference.hs
+++ b/src/Text/Pandoc/Lua/Marshal/Reference.hs
@@ -81,6 +81,7 @@ pushVal = \case
   NumVal i       -> pushIntegral i
   NamesVal names -> pushPandocList pushName names
   DateVal date   -> pushDate date
+  _              -> pushText mempty
 
 -- | Pushes a 'Date' as table.
 pushDate :: LuaError e => Pusher e Date
diff --git a/stack.yaml b/stack.yaml
index c3d03c0ee..8b0f98526 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -35,11 +35,12 @@ extra-deps:
 - ipynb-0.2
 - pandoc-types-1.22.2
 - texmath-0.12.5
-- citeproc-0.7
 - commonmark-0.2.2
 - commonmark-extensions-0.2.3.1
 - doclayout-0.4
 - doctemplates-0.10.0.2
+- git: https://github.com/jgm/citeproc
+  commit: 7874a4ccf1845e5a8a6855c251f1aaea9bf12807
 ghc-options:
    "$locals": -fhide-source-paths -Wno-missing-home-modules
 resolver: lts-18.10