diff --git a/src/Rest/RestClient.php b/src/Rest/RestClient.php
index 79c9c089c9b69f558b85422bfab227e9a4c2fdf7..e798bf6196b7356c7e1af6bf334244d8db09babe 100644
--- a/src/Rest/RestClient.php
+++ b/src/Rest/RestClient.php
@@ -736,10 +736,13 @@ class RestClient implements RestClientInterface {
       $result = $this->apiCall('sobjects');
       $this->cache->set('salesforce:objects', $result, $this->getRequestTime() + self::CACHE_LIFETIME, ['salesforce']);
     }
-
+//print_r($result);
     $sobjects = [];
     // Filter the list by conditions, and assign SF table names as array keys.
     foreach ($result['sobjects'] as $key => $object) {
+      if (empty($object['name'])) {
+        print_r($object);
+      }
       if (!empty($conditions)) {
         foreach ($conditions as $condition => $value) {
           if ($object[$condition] == $value) {
diff --git a/tests/src/Unit/RestClientTest.php b/tests/src/Unit/RestClientTest.php
index 1077f06a6398a40cc4091ed97beda23091126fb5..8072a3410a3842a32199f0723ad1de8c528b5cba 100644
--- a/tests/src/Unit/RestClientTest.php
+++ b/tests/src/Unit/RestClientTest.php
@@ -165,9 +165,11 @@ class RestClientTest extends UnitTestCase {
     $objects = [
       'sobjects' => [
         'Test' => [
+          'name' => 'Test',
           'updateable' => TRUE,
         ],
         'NonUpdateable' => [
+          'name' => 'NonUpdateable',
           'updateable' => FALSE,
         ],
       ],