diff --git a/stack/cas/castext2/blocks/parsons.block.php b/stack/cas/castext2/blocks/parsons.block.php
index 0c17c8e4537e2feeeb2db3553492f20455dfe198..6b29c5415ea6c98d1f1e5b4d43c40203f84e3181 100644
--- a/stack/cas/castext2/blocks/parsons.block.php
+++ b/stack/cas/castext2/blocks/parsons.block.php
@@ -263,7 +263,7 @@ class stack_cas_castext2_parsons extends stack_cas_castext2_block {
 
         // If rows and index are passed then the length of index should match the value of rows + 1
         if ($ogrows !== null) {
-            $code .= 'if (index !== undefined && index.length !== ' . $ogrows + 1 . ')
+            $code .= 'if (index !== undefined && index.length !== ' . ($ogrows + 1) . ')
                 {stack_js.display_error("' . stack_string('stackBlock_incorrect_index_length') . '");}' . "\n";
         }