diff --git a/src/Plugin/WebformScore/Maximum.php b/src/Plugin/WebformScore/Maximum.php
index dfc1a30..dd58928 100644
--- a/src/Plugin/WebformScore/Maximum.php
+++ b/src/Plugin/WebformScore/Maximum.php
@@ -3,6 +3,7 @@
 namespace Drupal\webform_score\Plugin\WebformScore;
 
 use Drupal\Core\TypedData\TypedDataInterface;
+use Drupal\Core\TypedData\TraversableTypedDataInterface;
 
 /**
  * @WebformScore(
@@ -29,11 +30,21 @@ class Maximum extends WebformScoreAggregateBase {
   /**
    * {@inheritdoc}
    */
-  public function score(TypedDataInterface $answer) {
+  public function score(TypedDataInterface $answers) {
     $scores = [];
+    $plugins = $this->createPlugins();
 
-    foreach ($this->createPlugins() as $plugin) {
-      $scores[] = $plugin->score($answer);
+    if (!($answers instanceof TraversableTypedDataInterface)) {
+      // If the answers are not in traversable format, convert them in an array
+      // so that further logic can work correctly.
+      $temp[] = $answers;
+      $answers = $temp;
+    }
+
+    foreach ($answers as $answer) {
+      foreach ($plugins as $plugin) {
+        $scores[] = $plugin->score($answer);
+      }
     }
 
     return max($scores);
