diff --git a/sf_prematch/sf_prematch.main.inc b/sf_prematch/sf_prematch.main.inc
index c6bd0f1..429cc33 100644
--- a/sf_prematch/sf_prematch.main.inc
+++ b/sf_prematch/sf_prematch.main.inc
@@ -16,7 +16,7 @@
  * @return string sfid
  */
 function sf_prematch_export($entity_name, $bundle_name, $drupal_object, $map, $match_by) {
-  if (empty($drupal_object) || empty($map->drupal) || empty($match_by)) {
+  if (empty($drupal_object) || empty($map->drupal_entity) ||empty($match_by)) {
     return;
   }
   // Get information to allow using handlers to get values of Drupal fields.
@@ -116,6 +116,11 @@ function sf_prematch_export($entity_name, $bundle_name, $drupal_object, $map, $m
       // no prematch is set
       return;
   }
+  
+  // Make sure that Id is in SELECT clause, since that's the data we're returning from the query
+  if(!preg_match('/\bId\b/', $fields_list)) {
+    $fields_list .= ', Id';
+  }
 
   $query = $select_clause . ' ' . $fields_list . $from_where_clause . ' ORDER BY CreatedDate ASC';
