diff --git a/sites/all/modules/deploy/deploy.manager.inc b/sites/all/modules/deploy/deploy.manager.inc
index fbec77d..33cc0e6 100644
--- a/sites/all/modules/deploy/deploy.manager.inc
+++ b/sites/all/modules/deploy/deploy.manager.inc
@@ -10,7 +10,7 @@ function deploy_manager_get_entities($plan_name) {
   $collection = array();
   $result = db_query("SELECT * FROM {deploy_manager_entities} WHERE plan_name = :plan_name", array(':plan_name' => $plan_name));
   foreach ($result as $record) {
-    $collection[$record->entity_type][] = $record->entity_id;
+    $collection[] = array('type' => $record->entity_type, 'id' => $record->entity_id);
   }
   // If the plan fetched from the database is empty, try fetch default UUID
   // entities (keyed with the name of this plan).
@@ -29,7 +29,7 @@ function deploy_manager_get_entities($plan_name) {
           $entity_ids = entity_get_id_by_uuid($entity->__metadata['type'], array($entity->{$uuid_key}));
           $entity_id = reset($entity_ids);
           if (!empty($entity_id)) {
-            $collection[$entity->__metadata['type']][] = $entity_id;
+            $collection[] = array('type' => $entity->__metadata['type'], 'id' => $entity_id);
           }
         }
       }
diff --git a/sites/all/modules/deploy/includes/DeployIterator.inc b/sites/all/modules/deploy/includes/DeployIterator.inc
index 5ec1669..ee292a9 100644
--- a/sites/all/modules/deploy/includes/DeployIterator.inc
+++ b/sites/all/modules/deploy/includes/DeployIterator.inc
@@ -11,9 +11,7 @@ class DeployIterator extends EntityDependencyIterator {
    * @return DeployIterator
    */
   public function getChildren() {
-    $iterator = new DeployIterator($this->getChildrenEntities(), $this);
-    $iterator->entityType = $this->entityType;
-    return $iterator;
+    return new DeployIterator($this->getChildrenEntities(), $this);
   }
 
   /**
@@ -24,19 +22,17 @@ class DeployIterator extends EntityDependencyIterator {
    */
   public function current() {
     $current = current($this->entities);
-    if (is_array($current)) {
-      return $current;
-    }
-    $uuids = entity_get_uuid_by_id($this->entityType, array($this->entityId));
+
+    $uuids = entity_get_uuid_by_id($current['type'], array($current['id']));
     $uuid = reset($uuids);
     // Load the current entity with UUID.
-    $entities = entity_uuid_load($this->entityType, array($uuid));
+    $entities = entity_uuid_load($current['type'], array($uuid));
     $entity = reset($entities);
     // Add necessary metadata to the entity.
     $origin = FALSE;
-    if (!empty($this->origins[$this->entityType][$this->entityId])) {
-      $origin_type = $this->origins[$this->entityType][$this->entityId]['type'];
-      $origin_id = $this->origins[$this->entityType][$this->entityId]['id'];
+    if (!empty($this->origins[$current['type']][$current['id']])) {
+      $origin_type = $this->origins[$current['type']][$current['id']]['type'];
+      $origin_id = $this->origins[$current['type']][$current['id']]['id'];
       $origin_uuids = entity_get_uuid_by_id($origin_type, array($origin_id));
       $origin_uuid = reset($origin_uuids);
       $origin = array(
@@ -46,14 +42,14 @@ class DeployIterator extends EntityDependencyIterator {
       );
     }
     $entity->__metadata = array(
-      'type' => $this->entityType,
-      'uri' => $this->entityType . '/' . $uuid,
+      'type' => $current['type'],
+      'uri' => $current['type'] . '/' . $uuid,
       'origin' => $origin,
     );
     // Now mark this as traversed.
-    $this->traversed[$this->entityType][$this->entityId] = TRUE;
+    $this->traversed[$current['type']][$current['id']] = TRUE;
     // Let other modules have their say.
-    drupal_alter('deploy_entity', $entity, $this->entityType);
+    drupal_alter('deploy_entity', $entity, $current['type']);
     return $entity;
   }
 }
