diff --git a/tests/src/Functional/XmlSitemapUnitTest.php b/tests/src/Functional/XmlSitemapUnitTest.php
index 0cad2a1..31c6f17 100644
--- a/tests/src/Functional/XmlSitemapUnitTest.php
+++ b/tests/src/Functional/XmlSitemapUnitTest.php
@@ -66,7 +66,7 @@ class XmlSitemapUnitTest extends XmlSitemapTestBase {
 
     foreach ($values as $i => $value) {
       $actual = xmlsitemap_get_changefreq($value);
-      $this->assertEquals($expected[$i], $actual);
+      $this->assertSame($expected[$i], $actual);
     }
   }
 
diff --git a/xmlsitemap.module b/xmlsitemap.module
index 0821e37..2370519 100644
--- a/xmlsitemap.module
+++ b/xmlsitemap.module
@@ -1040,11 +1040,11 @@ function xmlsitemap_entity_bundle_delete($entity_type_id, $bundle) {
  * @param int $interval
  *   An interval value in seconds.
  *
- * @return string
+ * @return string|\Drupal\Core\StringTranslation\TranslatableMarkup
  *   A string representing the update frequency according to the sitemaps.org
  *   protocol.
  */
-function xmlsitemap_get_changefreq($interval, bool $translated = TRUE) {
+function xmlsitemap_get_changefreq($interval, bool $translated = FALSE) {
   if ($interval <= 0 || !is_numeric($interval)) {
     return FALSE;
   }
diff --git a/xmlsitemap_custom/src/Controller/XmlSitemapCustomListController.php b/xmlsitemap_custom/src/Controller/XmlSitemapCustomListController.php
index ee70dd1..f011005 100644
--- a/xmlsitemap_custom/src/Controller/XmlSitemapCustomListController.php
+++ b/xmlsitemap_custom/src/Controller/XmlSitemapCustomListController.php
@@ -91,7 +91,7 @@ class XmlSitemapCustomListController extends ControllerBase {
       $row = [];
       $row['loc'] = Link::fromTextAndUrl($link->loc, Url::fromUri('internal:' . $link->loc));
       $row['priority'] = number_format($link->priority, 1);
-      $row['changefreq'] = $link->changefreq ? Unicode::ucfirst(xmlsitemap_get_changefreq($link->changefreq)) : $this->t('None');
+      $row['changefreq'] = $link->changefreq ? Unicode::ucfirst(xmlsitemap_get_changefreq($link->changefreq, TRUE)) : $this->t('None');
       if (isset($header['language'])) {
         $row['language'] = $language->getName();
       }
