diff --git a/special_menu_items.module b/special_menu_items.module
index 4f63862..bcdd664 100644
--- a/special_menu_items.module
+++ b/special_menu_items.module
@@ -41,6 +41,22 @@ function special_menu_items_menu() {
 }
 
 /**
+ * Override of theme_link()
+ * This function will render link if it is "nolink" or "separator". Otherwise it will call originally
+ * overwriten menu_item_link function.
+ */
+
+function special_menu_items_link(array $variables) {
+  if (in_array($variables['path'], array('<nolink>', '<separator>'))) {
+    return '<span' . drupal_attributes($variables['options']['attributes']) . '>'
+         . ($variables['options']['html'] ? $variables['text'] : check_plain($variables['text']))
+         . '</span>';
+  }
+  // Call the original theme function for normal menu link.
+  return theme('link_default',$variables);
+}
+
+/**
  * Override of theme_menu_item_link()
  * This function will render link if it is "nolink" or "separator". Otherwise it will call originally
  * overwriten menu_item_link function.
@@ -152,6 +168,9 @@ function special_menu_items_theme_registry_alter(&$registry) {
   // Save previous value from registry in case another theme overwrites menu_item_link
   $registry['menu_link_default'] = $registry['menu_link'];
   $registry['menu_link']['function'] = 'special_menu_items_menu_link';
+  
+  $registry['link_default'] = $registry['link'];
+  $registry['link']['function'] = 'special_menu_items_link';
 }
 
 /**
