diff --git a/template.php b/template.php
index 0389d75..fd18f5f 100644
--- a/template.php
+++ b/template.php
@@ -657,12 +657,17 @@ if (!function_exists('drupal_html_id')) {
  * replace _zen_path() with drupal_get_path('theme', 'zen').
  */
 function _zen_path() {
-  static $path = FALSE;
-  if (!$path) {
-    $matches = drupal_system_listing('zen\.info$', 'themes', 'name', 0);
-    if (!empty($matches['zen']->filename)) {
-      $path = dirname($matches['zen']->filename);
+  static $_path = FALSE;
+  if (!$_path) {
+    if (db_is_active()) {
+      $_path = drupal_get_path('theme', 'zen');
+    }
+    else {
+      $matches = drupal_system_listing('zen\.info$', 'themes', 'name', 0);
+      if (!empty($matches['zen']->filename)) {
+        $_path = dirname($matches['zen']->filename);
+      }
     }
   }
-  return $path;
+  return $_path;
 }
