diff --git a/mothership/template.php b/mothership/template.php
index a89ceab..dd61dc1 100644
--- a/mothership/template.php
+++ b/mothership/template.php
@@ -392,7 +392,7 @@ function mothership_preprocess(&$vars, $hook) {
     // $vars['content']['links']['#attributes']['class'][] = "hardrock hallelulia";
 
     //  remove the class attribute it its empty
-    if(!$vars['content']['links']['#attributes']['class']){
+    if(isset($vars['content']['links']['#attributes']['class'])){
       unset($vars['content']['links']['#attributes']['class']);
     }
 
