diff --git a/includes/workflow.views.inc b/includes/workflow.views.inc
index e3143fa..293521d 100644
--- a/includes/workflow.views.inc
+++ b/includes/workflow.views.inc
@@ -161,7 +161,7 @@ function workflow_views_data() {
   );
 
   // state
-  $data['workflow_node_history']['sid'] = array(
+  $data['workflow_node_history']['old_sid'] = array(
     'title' => t('Previous state'), // Appears in views UI.
     'help' => t('A workflow state that the node was in previously.'),
     'field' => array(
@@ -169,7 +169,7 @@ function workflow_views_data() {
       'click sortable' => TRUE,
      ),
     'filter' => array(
-      'handler' => 'workflow_views_handler_filter_sid',
+      'handler' => 'workflow_views_handler_filter_old_sid',
       'numeric' => TRUE,
     ),
   );
@@ -233,6 +233,9 @@ function workflow_views_handlers() {
       'workflow_views_handler_filter_sid' => array(
         'parent' => 'views_handler_filter_in_operator',
       ),
+      'workflow_views_handler_filter_old_sid' => array(
+        'parent' => 'views_handler_filter_in_operator',
+      ),
       // relationship handlers
       // sort handlers
     ),
diff --git a/includes/workflow_views_handler_filter_old_sid.inc b/includes/workflow_views_handler_filter_old_sid.inc
new file mode 100644
index 0000000..878b233
--- /dev/null
+++ b/includes/workflow_views_handler_filter_old_sid.inc
@@ -0,0 +1,50 @@
+<?php
+
+/**
+ * @file
+ * Provide views filter handler for workflow.module.
+ */
+
+/**
+ * Filter by state.
+ */
+class workflow_views_handler_filter_old_sid extends views_handler_filter_in_operator {
+  var $value_form_type = 'select';
+
+  function get_value_options() {
+    if (!isset($this->value_options)) {
+      $this->value_title = t('Previous state');
+
+      $workflows = workflow_get_all();
+      if (count($workflows) > 1) {
+        $states = array('' => t('No state'));
+        foreach ($workflows as $wid => $wname) {
+          $states[$wname] = workflow_get_states($wid);
+        }
+      }
+      else {
+        $states = workflow_get_states();
+      }
+
+      $this->value_options = $states;
+    }
+  }
+
+  function query() {
+    if (empty($this->value)) {
+      return;
+    }
+    $this->ensure_my_table();
+    $placeholder = !empty($this->definition['numeric']) ? '%d' : "'%s'";
+
+    if (count($this->value) == 1) {
+      $this->operator = ($this->operator == 'in') ? '= ' : '!= ';
+      $in = !empty($this->definition['numeric']) ? '%d' : "'%s'";
+    }
+    else {
+      $replace = array_fill(0, sizeof($this->value), $placeholder);
+      $in = ' (' . implode(", ", $replace) . ')';
+    }
+    $this->query->add_where($this->options['group'], "$this->table_alias.$this->real_field " . $this->operator . $in, $this->value);
+  }
+}
