diff --git a/breadcrumbs_by_path.module b/breadcrumbs_by_path.module
index d3e8a23..fc88458 100644
--- a/breadcrumbs_by_path.module
+++ b/breadcrumbs_by_path.module
@@ -77,8 +77,13 @@ function _breadcrumbs_by_path_build_trail($uri) {
 
     // recursively trim uri and look for available path
     while ($uri && $uri != '.') {
-
-      // first we see if the uri directs to a valid path
+	  
+      // Provide sane defaults for broken paths.
+      $trail[$i] = array(
+        'title' => t('No title: @url', array('@url' => check_url($uri))),
+        'path' => check_url($uri),
+      );
+      // First we see if the uri directs to a valid path.
       $path = drupal_lookup_path('source', $uri);
       $trail[$i]['path'] = $uri;
 
@@ -116,9 +121,9 @@ function _breadcrumbs_by_path_build_trail($uri) {
     $trail = array_reverse($trail);
   }
 
-  // now build the actual breadcrumb trail in the right format
-  $bc = array(l('Home', '/'));
-  foreach($trail as $c) {
+  // Now build the actual breadcrumb trail in the right format.
+  $bc = array(l(t('Home'), '<front>'));
+  foreach ($trail as $c) {
     $bc[] = l($c['title'], $c['path']);
   }
 
@@ -133,7 +138,7 @@ function _breadcrumbs_by_path_clean_string($string) {
   $string = str_replace(array('-', '_'), ' ', $string);
 
   // Make the first character of the title uppercase
-  $string = ucfirst($string);
+  $string = drupal_ucfirst($string);
 
   return $string;
 }
