diff --git a/workbench_moderation.module b/workbench_moderation.module
index f510e2e..d731cf9 100644
--- a/workbench_moderation.module
+++ b/workbench_moderation.module
@@ -675,13 +675,28 @@ function workbench_moderation_node_update($node) {
     return;
   }
 
-  // Set default moderation state values.
+  // Set moderation state values.
   if (!isset($node->workbench_moderation_state_current)) {
-    $node->workbench_moderation_state_current = ($node->status ? workbench_moderation_state_published() : workbench_moderation_state_none());
-  };
+    $node->workbench_moderation_state_current = !empty($node->original->workbench_moderation['current']->state) ? $node->original->workbench_moderation['current']->state : workbench_moderation_state_none();
+  }
   if (!isset($node->workbench_moderation_state_new)) {
-    $node->workbench_moderation_state_new = variable_get('workbench_moderation_default_state_' . $node->type, workbench_moderation_state_none());
-  };
+    // Moving from published to unpublished.
+    if ($node->status === NODE_NOT_PUBLISHED && isset($node->original->status) && $node->original->status == NODE_PUBLISHED) {
+      $node->workbench_moderation_state_new = variable_get('workbench_moderation_default_state_' . $node->type, workbench_moderation_state_none());
+    }
+    // Moving from unpublished to published.
+    elseif ($node->status === NODE_PUBLISHED && isset($node->original->status) && $node->original->status == NODE_NOT_PUBLISHED) {
+      $node->workbench_moderation_state_new = workbench_moderation_state_published();
+    }
+    else {
+      if (!empty($node->original->workbench_moderation['current']->state)) {
+        $node->workbench_moderation_state_new = $node->original->workbench_moderation['current']->state;
+      }
+      else {
+        $node->workbench_moderation_state_new = variable_get('workbench_moderation_default_state_' . $node->type, workbench_moderation_state_none());
+      }
+    }
+  }
 
   // If this is a new node, give it some information about 'my revision'.
   if (!isset($node->workbench_moderation)) {
