diff --git a/src/Provider.php b/src/Provider.php
index <HASH>..<HASH> 100644
--- a/src/Provider.php
+++ b/src/Provider.php
@@ -619,7 +619,7 @@ class Provider
                     );
                 }
             },
-            function () use ($metadataPrefix) {
+            function () use (&$metadataPrefix) {
                 if (!isset($this->params['metadataPrefix'])) {
                     throw new BadArgumentException("Missing required argument metadataPrefix");
                 }
Set $metadataPrefix in getRecordListParams()

Since the value is set in a closure, it must be passed by reference