diff --git a/contrib/search_api_facetapi/search_api_facetapi.module b/contrib/search_api_facetapi/search_api_facetapi.module
index 3696eae5..d427f43f 100644
--- a/contrib/search_api_facetapi/search_api_facetapi.module
+++ b/contrib/search_api_facetapi/search_api_facetapi.module
@@ -438,10 +438,16 @@ function _search_api_facetapi_facet_create_label(array $values, array $options)
   if (isset($field['entity_type'])) {
     $type = $field['entity_type'];
     $entities = entity_load($type, $values);
-    foreach ($entities as $id => $entity) {
-      $label = entity_label($type, $entity);
-      if ($label !== FALSE) {
-        $map[$id] = $label;
+    foreach ($values as $id) {
+      if (!empty($entities[$id])) {
+        $label = entity_label($type, $entities[$id]);
+        if ($label !== FALSE) {
+          $map[$id] = $label;
+        }
+      }
+      else {
+        // Hide the entities that could not be loaded.
+        $map[$id] = NULL;
       }
     }
     if (count($map) == $n) {
