diff --git a/mothership/templates/page.tpl.php b/mothership/templates/page.tpl.php
index f2ede38..d38fb1b 100644
--- a/mothership/templates/page.tpl.php
+++ b/mothership/templates/page.tpl.php
@@ -55,9 +55,9 @@
       <ul class="action-links"><?php print render($action_links); ?></ul>
     <?php endif; ?>
 
-    <?php if (isset($tabs)): ?>
-      <nav class="tabs"><?php print render($tabs); ?></nav>
-    <?php endif; ?>
+  <?php if (isset($tabs['#primary'][0]) || isset($tabs['#secondary'][0])): ?>
+    <nav class="tabs"><?php print render($tabs); ?></nav>
+  <?php endif; ?>
 
     <?php if($page['highlighted'] OR $messages){ ?>
       <div class="drupal-messages">
