diff --git purl.module purl.module
index b08ede4..9fc075d 100644
--- purl.module
+++ purl.module
@@ -297,7 +297,7 @@ function purl_url_outbound_alter(&$path, &$options, $original) {
   if (!purl_disable() && !$options['alias'] && !strpos($path, '://')) {
     $elements = array();
 
-    if (!isset($global_elements)) {
+    if (!isset($global_elements) || $global_elements == NULL) {
       $global_elements = array();
       // Retrieve the path values for the current page that were
       // "stripped out" and write them back into url paths.

