--- tmp/pathauto.inc	2009-03-21 13:28:54.000000000 +1300
+++ pathauto/pathauto.inc	2009-05-14 13:44:56.000000000 +1200
@@ -204,6 +204,9 @@
 
     // Replace multiple separators with a single one
     $output = preg_replace("/$seppattern+/", "$separator", $output);
+
+	// Replace trailing separators around slashes
+    $output = preg_replace("/$seppattern\/|\/$seppattern/", "/", $output);
   }
 
   // Enforce the maximum component length
