diff --git a/template.php b/template.php
index 380a7eb..8de1e14 100644
--- a/template.php
+++ b/template.php
@@ -131,12 +131,12 @@ function zen_preprocess_html(&$variables, $hook) {
     $path = drupal_get_path_alias($_GET['q']);
     // Add unique class for each website section.
     list($section, ) = explode('/', $path, 2);
-    $arg = explode('/', $_GET['q']);
+    $arg = explode('/', $_GET['q'] . '//');
     if ($arg[0] == 'node') {
       if ($arg[1] == 'add') {
         $section = 'node-add';
       }
-      elseif (isset($arg[2]) && is_numeric($arg[1]) && ($arg[2] == 'edit' || $arg[2] == 'delete')) {
+      elseif (is_numeric($arg[1]) && ($arg[2] == 'edit' || $arg[2] == 'delete')) {
         $section = 'node-' . $arg[2];
       }
     }
