diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php
index eb41714aea..f20ad62eb2 100644
--- a/pandora_console/include/functions_events.php
+++ b/pandora_console/include/functions_events.php
@@ -2740,7 +2740,11 @@ function events_get_agent(
         'te.utimestamp'
     );
 
-    return $events['data'];
+    if (is_metaconsole() === true) {
+        $events = $events['data'];
+    }
+
+    return $events;
 }
 
 
diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php
index e5bdb203c0..2e590a6487 100755
--- a/pandora_console/include/functions_reporting.php
+++ b/pandora_console/include/functions_reporting.php
@@ -10454,14 +10454,14 @@ function reporting_get_module_detailed_event(
             $event['data'] = [];
         }
 
-        // total_events
+        // Total events.
         if (isset($event['data'])) {
             $event['total_events'] = count($event['data']);
         } else {
             $event['total_events'] = 0;
         }
 
-        // graphs
+        // Graphs.
         if (!empty($force_width_chart)) {
             $width = $force_width_chart;
         }