diff --git a/pift.cron.inc b/pift.cron.inc
index b468b16..c234cd7 100644
--- a/pift.cron.inc
+++ b/pift.cron.inc
@@ -64,14 +64,15 @@ function pift_cron_retest() {
 function pift_cron_queue_batch() {
   $i = 1;
   while (($batch = pift_cron_queue_batch_build()) && $batch['projects']) {
+    watchdog('pift', 'Sending batch to server %server: <pre>%batch</pre>', array('%server' => PIFT_SERVER, '%batch' => print_r($batch, TRUE)));
     $response = xmlrpc(PIFT_SERVER . 'xmlrpc.php', 'pifr.queue', PIFT_KEY, $batch);
     if ($response === FALSE) {
       watchdog('pift', 'Failed to send test queue requests to server.', array(), WATCHDOG_ERROR);
       break;
     }
     elseif (isset($response['response'])) {
-      watchdog('pift', 'Test queue request did not succeed: @message.',
-        array('@message' => pift_cron_response_code($response['response'])), WATCHDOG_ERROR);
+      watchdog('pift', 'Test queue request did not succeed: @message. full response=<pre>@response</pre>',
+        array('@message' => pift_cron_response_code($response['response']), '%response' => print_r($response, TRUE)), WATCHDOG_ERROR);
       break;
     }
     elseif (isset($response['branches']) && isset($response['files'])) {
@@ -82,7 +83,7 @@ function pift_cron_queue_batch() {
         }
       }
 
-      // Store file test IDs using the client_identifier (file ID).
+      // Store file test IDs using the client_identifier (file ID in this case).
       foreach ($batch['files'] as $file) {
         if (isset($response['files'][$file['client_identifier']])) {
           pift_test_sent($response['files'][$file['client_identifier']], PIFT_TYPE_FILE, $file['client_identifier']);
@@ -154,28 +155,31 @@ function pift_cron_queue_batch_build_files(array &$batch, array &$branches) {
                       LIMIT %d', PIFT_TYPE_FILE, PIFT_STATUS_QUEUE, PIFT_XMLRPC_MAX);
   while ($file = db_fetch_array($result)) {
     // Load the issue related to the file, either from the comment or node.
-    $issue = node_load($file['u_nid'] ? $file['u_nid'] : $file['c_nid']);
-
-    // Generate item information.
+    $issue_nid = !empty($file['u_nid']) ? $file['u_nid'] : $file['c_nid'];
     $item = array(
-      'branch_identifier' => $issue->project_issue['rid'],
       'client_identifier' => $file['fid'],
       'file_url' => file_create_url($file['filepath']),
     );
 
+
+    $branch_info_result = db_fetch_array(db_query('SELECT prn.nid AS rid, prn.version_major, prn.tag
+                             FROM {project_issues} pi, {project_release_nodes} prn
+                             WHERE pi.nid = %d AND pi.rid = prn.nid', $issue_nid));
+
+    $item['branch_identifier'] = $branch_info_result['rid'];
+    // Store branch as needed to be included with data.
+    $branches[$branch_info_result['rid']] = FALSE; // Do not test unless commit found.
+
     // Generate link to file issue and comment if relevant.
     if ($file['c_cid']) {
-      $item['link'] = url('node/' . $issue->nid, array('absolute' => TRUE, 'fragment' => 'comment-' . $file['c_cid']));
+      $item['link'] = url('node/' . $issue_nid, array('absolute' => TRUE, 'fragment' => 'comment-' . $file['c_cid']));
     }
     else {
-      $item['link'] = url('node/' . $issue->nid, array('absolute' => TRUE));
+      $item['link'] = url('node/' . $issue_nid, array('absolute' => TRUE));
     }
 
     // Add file to batch.
     $batch['files'][] = $item;
-
-    // Store branch as needed to be included with data.
-    $branches[$issue->project_issue['rid']] = FALSE; // Do not test unless commit found.
   }
 }
 
@@ -257,6 +261,14 @@ function pift_cron_queue_batch_build_branches_process(array &$batch, array &$bra
       // Cycle through dependencies and add the related branches to the implied
       // branch list if they are not already being processed.
       $dependencies = project_info_dependency_list_get($branch->nid);
+
+      // @TODO: Remove the following line which eliminates the findings of above
+      // code.
+      // Currently the project_info tables are not properly built. Example:
+      // token_example in Examples 6.x-1.x has dependency per
+      // project_info_dependency on token, but that dependency_id (453016) is
+      // not in the project_info_module table.
+      $dependencies = array();
       foreach ($dependencies as $dependency) {
         $item['dependency'][$dependency['rid']] = $dependency['rid'];
       }
@@ -275,6 +287,7 @@ function pift_cron_queue_batch_build_branches_process(array &$batch, array &$bra
 
       // Flatten array of dependencies and fill in modules list.
       $item['dependency'] = implode(',', $item['dependency']);
+
       $item['plugin_argument']['drupal.modules'] = array_keys(project_info_module_list_get($branch->nid));
     }
 
