diff --git a/fb_url_rewrite.inc b/fb_url_rewrite.inc
index 6531258..7ca4a04 100644
--- a/fb_url_rewrite.inc
+++ b/fb_url_rewrite.inc
@@ -120,19 +120,16 @@ function fb_url_outbound_alter(&$path, &$options, $original_path) {
   // Prefix each known value to the URL
   foreach (_fb_settings_url_rewrite_prefixes() as $prefix) {
     if (!isset($options[$prefix]) || $options[$prefix] !== FALSE) {
-      if ($value = fb_settings($prefix))
-        $pre .= $prefix . '/' . $value . '/';
+      if ($value = fb_settings($prefix)) {
+        // Append on our settings to the path prefix.
+        if (isset($options['prefix'])) {
+          $options['prefix'] = $prefix . '/' . $value . '/' . $options['prefix'];
+        }
+        else {
+          $options['prefix'] = $prefix . '/' . $value;
+        }
+      }
     }
-
-    // Rewrite path to allow for use of language prefixes.
-    $original_path = $path;
-
-    $path  = $pre;
-    $path .= !empty($options['prefix']) ? $options['prefix'] : '';
-    $path .= $original_path;
-
-    // We have manually set the prefix, so remove the options prefix.
-    $options['prefix'] = '';
   }
 
   // Since we called fb_canvas_url_alter already, supress it from acting again.
