diff --git a/classes/utility/proforma_xml/grading_scheme_handler.php b/classes/utility/proforma_xml/grading_scheme_handler.php
index debe1688c6ce1a826dcae4e31a741d4e594fed45..1f6db5ba37a5bd1c23c6b55e532f069c627be0c1 100644
--- a/classes/utility/proforma_xml/grading_scheme_handler.php
+++ b/classes/utility/proforma_xml/grading_scheme_handler.php
@@ -246,7 +246,11 @@ class grading_scheme_handler {
             }
         }
         if(!$foundTitle) {
-            $node->set_title($this->tests[$refid] !== null && $this->tests[$refid]->getElementsByTagNameNS($this->namespace, 'title')[0]->nodeValue);
+            $title = "";
+            if ($this->tests[$refid] !== null && $this->tests[$refid]->getElementsByTagNameNS($this->namespace, 'title')->length >= 1) {
+                $title = $this->tests[$refid]->getElementsByTagNameNS($this->namespace, 'title')[0]->nodeValue;
+            }
+            $node->set_title($title);
         }
         if (($list = $elem->getElementsByTagNameNS($this->namespace, 'description'))->length == 1) {
             $node->set_description($list[0]->nodeValue);