diff --git a/drafty.module b/drafty.module
index db34632..bbee463 100644
--- a/drafty.module
+++ b/drafty.module
@@ -171,6 +171,13 @@ class Drafty {
   public function setRevisionToBePublished($type, $id, $vid) {
     // Only one revision can be published during a request, so just overwrite
     // and for now last one wins.
+    $path = current_path();
+    if (drupal_match_path($path, 'batch') && $type == 'node' ) {
+      $result = db_query_range('SELECT r.vid as draft_vid, r.title, r.log, n.vid AS current_draft_vid, r.timestamp FROM {node_revision} r LEFT JOIN {node} n ON n.nid = r.nid WHERE r.nid = :nid and n.vid != r.vid ORDER BY r.vid DESC', 0, 1, array(':nid' => $id))->fetchField();
+      if ($result > 0) {
+        $vid = $result;
+      }
+    }
     $this->revisionsToPublish[$type][$id] = $vid;
 
     return $this;
@@ -187,6 +194,13 @@ class Drafty {
    * @return The newly published revision.
    */
   function publishRevision($type, $id, $vid) {
+    $path = current_path();
+    if (drupal_match_path($path, 'batch') && $type == 'node' ) {
+      $result = db_query_range('SELECT r.vid as draft_vid, r.title, r.log, n.vid AS current_draft_vid, r.timestamp FROM {node_revision} r LEFT JOIN {node} n ON n.nid = r.nid WHERE r.nid = :nid and n.vid != r.vid ORDER BY r.vid DESC', 0, 1, array(':nid' => $id))->fetchField();
+      if ($result > 0) {
+        $vid = $result;
+      }
+    }
     // Title module assumes that the current content language is used when
     // saving an entity. This is OK for the new draft revision, but it does not
     // work when publishing a revision. Therefore, ensure that
