diff --git a/views-bulk-operations-table.tpl.php b/views-bulk-operations-table.tpl.php
index f2b546c..66107a5 100644
--- a/views-bulk-operations-table.tpl.php
+++ b/views-bulk-operations-table.tpl.php
@@ -22,9 +22,9 @@
     <tr>
       <?php foreach ($header as $key => $value): ?>
         <?php if ($key == 'select') { ?>
-          <th class="<?php print $class[$key] ?>"><?php print $value ?></th>
+          <th class="select"><?php print $value ?></th>
         <?php } else { ?>
-          <th class="views-field views-field-<?php print $class[$key] ?>"><?php print $value ?></th>
+          <th class="views-field views-field-<?php print $fields[$key] ?>"><?php print $value ?></th>
         <?php } ?>
       <?php endforeach; ?>
     </tr>
diff --git a/views_bulk_operations.module b/views_bulk_operations.module
index bdda1ea..cbc9d1d 100644
--- a/views_bulk_operations.module
+++ b/views_bulk_operations.module
@@ -315,6 +315,21 @@ function views_bulk_operations_theme() {
 function template_preprocess_views_bulk_operations_table(&$vars, $hook) {
   $view = $vars['view'];
 
+  $options  = $view->style_plugin->options;
+  $handler  = $view->style_plugin;
+
+  $fields   = &$view->field;
+  $columns  = $handler->sanitize_columns($options['columns'], $fields);
+
+  $active   = !empty($handler->active) ? $handler->active : '';
+
+  foreach ($columns as $field => $column) {
+    $vars['fields'][$field] = views_css_safe($field);
+    if ($active == $field) {
+      $vars['fields'][$field] .= ' active';
+    }
+  }
+
   $count = 0;
   foreach ($vars['rows'] as $num => $row) {
     $vars['row_classes'][$num][] = ($count++ % 2 == 0) ? 'odd rowclick' : 'even rowclick';
