diff --git a/sf_node/sf_node.module b/sf_node/sf_node.module
index b4fb2ad..4b41a21 100644
--- a/sf_node/sf_node.module
+++ b/sf_node/sf_node.module
@@ -414,6 +414,10 @@ function sf_node_salesforce_form(&$form_state, $node) {
   if ($node->salesforce->sfid) {
     // Retrieve the object from Salesforce.
     $sf_data = salesforce_api_retrieve(array($node->salesforce->sfid), $node->salesforce->name);
+    // Check to see if sf_data is an array of objects
+    if (is_array($sf_data) && count($sf_data) > 0) {
+      $sf_data = $sf_data[0];
+    }
     // If $sf_data is empty, we assume the record is deleted. retrieve() does
     // not return the ENTITY_IS_DELETED error that upsert() does.
     if (!$sf_data && SALESFORCE_DELETED_POLICY_UPSERT == variable_get('salesforce_api_entity_deleted_policy', SALESFORCE_DELETED_POLICY_UPSERT)) {
@@ -678,6 +682,11 @@ function sf_node_export($node, $name, $sfid = NULL) {
 
   $response = $sf->client->upsert('Id', array($object), $map->salesforce);
 
+  // Check to see if response is an array of objects
+  if (is_array($response) && count($response) > 0) {
+    $response = $response[0];
+  }
+  
   // If we got errors, handle them before proceeding
   if (is_object($response->errors)) {
     // If we got "Entity is deleted" and we're configured to unlink and upsert,
@@ -752,6 +761,10 @@ function sf_node_import($sf_data, $name, $nid = NULL) {
 
   if (is_sfid($sf_data)) {
     $sf_data = salesforce_api_retrieve(array($sf_data), $name);
+    // Check to see if sf_data is an array of objects
+    if (is_array($sf_data) && count($sf_data) > 0) {
+      $sf_data = $sf_data[0];
+    }
   }
   elseif (is_array($sf_data)) {
     $sf_data = (object) $sf_data;
diff --git a/sf_user/sf_user.module b/sf_user/sf_user.module
index bf3b162..4f0848e 100644
--- a/sf_user/sf_user.module
+++ b/sf_user/sf_user.module
@@ -229,7 +229,11 @@ function sf_user_salesforce_form(&$form_state, $account) {
   if ($account->salesforce->sfid) {
     // Retrieve the object from Salesforce.
     $sf_data = salesforce_api_retrieve(array($account->salesforce->sfid), $account->salesforce->name);
-
+    
+    // Check to see if salesforce_api_retrieve returned an array of objects
+    if (is_array($sf_data) && count($sf_data) > 0) {
+      $sf_data = $sf_data[0];
+    }
     if (!$sf_data && SALESFORCE_DELETED_POLICY_UPSERT == variable_get('salesforce_api_entity_deleted_policy', SALESFORCE_DELETED_POLICY_UPSERT)) {
       // Unlink the object
       salesforce_api_id_unlink(array('oid' => $account->uid, 'name' => $account->salesforce->name));
@@ -493,6 +497,11 @@ function sf_user_export($uid, $name, $sfid = NULL) {
 
   $response = $sf->client->upsert('Id', array($object), $map->salesforce);
 
+  // Check to see if response is an array of objects
+  if (is_array($response) && count($response) > 0) {
+    $response = $response[0];
+  }
+  
   // If we got errors, handle them before proceeding
   if (is_object($response->errors)) {
     // If we got "Entity is deleted" and we're configured to unlink and upsert,
@@ -561,6 +570,10 @@ function sf_user_import($sf_data, $name, $uid = NULL) {
 
   if (is_sfid($sf_data)) {
     $sf_data = salesforce_api_retrieve(array($sf_data), $name);
+    // Check to see if sf_data is an array of objects
+    if (is_array($sf_data) && count($sf_data) > 0) {
+      $sf_data = $sf_data[0];
+    }
   }
   elseif (is_array($sf_data)) {
     $sf_data = (object) $sf_data;
