diff --git a/inc/pluginutils.php b/inc/pluginutils.php
index 0adba09f34f7435a77a1e3311f383f743fcaeef8..183e2222983f8e274bf0f2b25494a4396a45a0e9 100644
--- a/inc/pluginutils.php
+++ b/inc/pluginutils.php
@@ -82,7 +82,7 @@ function &plugin_load($type,$name){
     }
   }
 
-  //construct class and instanciate
+  //construct class and instantiate
   $class = $type.'_plugin_'.$name;
   if (!class_exists($class)) return null;
 
diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php
index 2a4d1e0ff1176a1507e416e181fdc5502ae6999e..ccf657720301fc1e2f259049b4fe1e6f350d8d49 100644
--- a/lib/plugins/syntax.php
+++ b/lib/plugins/syntax.php
@@ -133,8 +133,11 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode {
             foreach($allowedModeTypes as $mt) {
                 $this->allowedModes = array_merge($this->allowedModes, $PARSER_MODES[$mt]);
             }        
-                
-            unset($this->allowedModes[array_search(substr(get_class($this), 7), $this->allowedModes)]);
+
+            $idx = array_search(substr(get_class($this), 7), $this->allowedModes);
+            if ($idx !== false) {
+              unset($this->allowedModes[$idx]);
+            }
             $this->allowedModesSetup = true;
         }