diff --git a/weblinks.test b/weblinks.test
index f6de816..1630976 100644
--- a/weblinks.test
+++ b/weblinks.test
@@ -56,6 +56,7 @@ class WeblinksTestCase extends DrupalWebTestCase {
     // Prepare a user to do the stuff.
     $user = $this->drupalCreateUser(array('access content', 'access web links', 'create weblinks', 'edit own weblinks'));
     $this->drupalLogin($user);
+    debug('above login failure caused by core check for "logout" link');
 
     $settings = array(
       'type' => 'weblinks',
@@ -98,12 +99,13 @@ class WeblinksTestCase extends DrupalWebTestCase {
     $this->assertText(t('Add a new link'), t('"Add new" link displayed.'), 'Basic');
     $this->assertText(t('Unclassified'), t('Unclassified group displayed.'), 'Basic');
     $this->assertText($user->name, t('User name displayed.'), 'Basic');
+    debug('fails in local tests - the user name is not shown on the page');
     $link1_shouldbe = '<a href="http://www.example.com" target="_blank" title="A sample link">http://www.example.com</a>';
     $this->assertRaw($link1_shouldbe, t('URL displayed in URL mode.'), 'Basic');
 
     // Switch mode to "redirect."
     variable_set('weblinks_redirect', TRUE);
-    $link1_shouldbe = '<a href="/weblinks/goto/'. $link1->nid .'" target="_blank" title="A sample link">http://www.example.com</a>';
+    $link1_shouldbe = '<a href="' . url('weblinks/goto/' . $link1->nid) . '" target="_blank" title="' . $link1->title . '">' . $link1->url . '</a>';
     $content = $this->drupalGet('weblinks');
 //    $this->pass(check_plain($content));
     $this->assertRaw($link1_shouldbe, t('URL displayed in Redirect mode.'), 'Basic');
diff --git a/weblinks.module b/weblinks.module
index 6593121..e7cdcd8 100644
--- a/weblinks.module
+++ b/weblinks.module
@@ -88,7 +88,7 @@ function weblinks_init() {
   if (arg(0) == 'weblinks') {
     $active_trail = menu_set_active_trail();
     foreach ($active_trail as $key => $item) {
-      if ($item['path'] == 'weblinks') {
+      if (isset($item['link_path']) && $item['link_path'] == 'weblinks') {
         $active_trail[$key]['title'] = _weblinks_get_menu_title();
       }
     }
@@ -409,6 +409,9 @@ function template_preprocess_weblinks_link(&$variables) {
 
   // Call all contribs to add to the variables.
   $variables += module_invoke_all('weblinks_preprocess', $node);
+  if (!array_key_exists('link_status', $variables)) {
+    $variables['link_status'] = NULL; // Link checker not available, fake its output
+  }
 }
 
 /**
