diff --git a/uw_dashboard.module b/uw_dashboard.module
index 95d44ef8ec2f47610695bf9853c54f99310b1093..7d7b62e516ff5aff035d2731f74cf3831ed16403 100644
--- a/uw_dashboard.module
+++ b/uw_dashboard.module
@@ -129,11 +129,11 @@ function uw_dashboard_entity_type_alter(array &$entity_types) {
 function uw_dashboard_views_pre_execute(ViewExecutable $view) {
 
   // Have a variable that can be used "globally".
-  static $view_instances = [];
+  static $view_instances_count;
 
   // If there is no count yet, set it to 0.
-  if (!isset($view_instances['count'])) {
-    $view_instances['count'] = 0;
+  if (!isset($view_instances_count)) {
+    $view_instances_count = 0;
   }
 
   // The views that need the pager id adjusted.
@@ -148,9 +148,9 @@ function uw_dashboard_views_pre_execute(ViewExecutable $view) {
   if (in_array($view->id(), $view_ids)) {
 
     // Increment the counter, so we get the correct pager id.
-    $view_instances['count']++;
+    $view_instances_count++;
 
     // Set the pager id in the view.
-    $view->pager->options['id'] = $view_instances['count'];
+    $view->pager->options['id'] = $view_instances_count;
   }
 }