diff --git a/patacrep/songs/chordpro/__init__.py b/patacrep/songs/chordpro/__init__.py
index 9e06f788..c5b80888 100644
--- a/patacrep/songs/chordpro/__init__.py
+++ b/patacrep/songs/chordpro/__init__.py
@@ -78,8 +78,8 @@ class Chordpro2HtmlSong(ChordproSong):
def search_file(self, filename, extensions=None, *, datadirs=None):
try:
- datadir, filename, extensions = self.search_datadir_file(filename, extensions, datadirs)
- return os.path.join(datadir, filename + extensions)
+ datadir, filename, extension = self.search_datadir_file(filename, extensions, datadirs)
+ return os.path.join(datadir, filename + extension)
except FileNotFoundError:
LOGGER.warning(
"Song '%s' (datadir '%s'): File '%s' not found.",
diff --git a/patacrep/songs/chordpro/data/html/content_metadata_cover b/patacrep/songs/chordpro/data/html/content_metadata_cover
index 0da23623..ef980a0a 100644
--- a/patacrep/songs/chordpro/data/html/content_metadata_cover
+++ b/patacrep/songs/chordpro/data/html/content_metadata_cover
@@ -1,6 +1,6 @@
(* block cov *)
(* if 'cov' in metadata -*)
- (* set cov = metadatad['cov'].argument|search_image *)
+ (* set cov = metadata['cov'].argument|search_image *)
(* if cov *)
(* endif *)