diff --git a/panopoly_magic.module b/panopoly_magic.module
index 4503fe8..5974b24 100644
--- a/panopoly_magic.module
+++ b/panopoly_magic.module
@@ -1198,17 +1198,20 @@ function panopoly_magic_views_pre_render(&$view) {
       $view->style_plugin->display =& $view->display_handler->display;
       
       // Set or remove header labels depending on user selection.
-      if (!empty($conf['header_type']) && $conf['header_type'] == 'titles') {
-        foreach ($view->field as &$field) {
+      $use_header_titles = !empty($conf['header_type']) && $conf['header_type'] == 'titles';
+      foreach ($view->field as &$field) {
+        if ($use_header_titles && !empty($field->options['ui_name']) && empty($field->options['label'])) {
           $field->options['label'] = $field->options['ui_name'];
         }
-      }
-      else {
-        foreach ($view->field as &$field) {
+        elseif (!$use_header_titles) {
           $field->options['label'] = NULL;
         }
+        // Hide empty columns.
+        if (!empty($view->style_plugin->row_plugin->options['hide_empty'])) {
+          $view->style_plugin->options['info'][$field->field]['empty_column'] = TRUE;
+        }
       }
-  }
+    }
 
     // Set the view mode
     if (isset($conf['view_mode'])) {
