diff --git a/inline_entity_form.module b/inline_entity_form.module
index be41f13..a5cc454 100644
--- a/inline_entity_form.module
+++ b/inline_entity_form.module
@@ -377,8 +377,33 @@ function inline_entity_form_field_widget_form(&$form, &$form_state, $field, $ins
   // Get the langcode of the parent entity.
   $parent_langcode = entity_language($element['#entity_type'], $element['#entity']);
 
+  if (!isset($form['#ief_id'])) {
+    $depth = 0;
+    $path = '';
+  }
+  else {
+    $path = $form['#ief_id'];
+    $path_parts = explode('--', $path);
+    $depth = count($path_parts);
+    $path = $path . '--';
+  }
+
+  // Edit operation; delta of ief provided.
+  if ($depth > 0 && isset($form['#ief_row_delta'])) {
+    $child_delta = $form['#ief_row_delta'];
+  }
+  // Add operation; determine delta for new form by counting parent's entities.
+  else if ($depth > 0 && !isset($form['#ief_row_delta'])) {
+    $child_delta = count($form_state['inline_entity_form'][$form['#ief_id']]['entities']);
+  }
+  // Initial value.
+  else {
+    $child_delta = 0;
+  }
+
+
   // Assign a unique identifier to each IEF widget.
-  $ief_id = $instance['id'];
+  $ief_id = $path . $instance['id'] . '_' . $depth . '_' . $child_delta;
   // Determine the wrapper ID for the entire element.
   $wrapper = 'inline-entity-form-' . $ief_id;
   $element = array(
@@ -862,6 +887,15 @@ function inline_entity_form_process_entity_form(&$entity_form, &$form_state) {
   }
 
   $ief_id = $entity_form['#ief_id'];
+  // Don't react on parent if nesting ief and submission was triggered by child.
+  $return_next = &drupal_static(__FUNCTION__);
+  if (!empty($return_next)) {
+    return;
+  }
+  else if (strpos($form_state['clicked_button']['#name'], $ief_id)) {
+    $return_next = TRUE;
+  }
+
   $instance = $form_state['inline_entity_form'][$ief_id]['instance'];
   // Instantiate the controller and validate the form.
   $controller = inline_entity_form_get_controller($instance);
@@ -1105,6 +1139,11 @@ function inline_entity_form_remove_confirm($form, &$form_state) {
   $ief_id = $element['#ief_id'];
   $instance = $form_state['inline_entity_form'][$ief_id]['instance'];
   $delta = $form_state['triggering_element']['#ief_row_delta'];
+  foreach ($form_state['inline_entity_form'] as $key => $value) {
+    if (!strpos($key, $ief_id) && preg_match("/$ief_id--[0-9]+_[0-9]+_$delta/", $key)) {
+      unset($form_state['inline_entity_form'][$key]);
+    }
+  }
   $remove_form = $element['entities'][$delta]['form'];
 
   // Instantiate the controller and submit the form.
@@ -1161,7 +1200,18 @@ function inline_entity_form_open_form($form, &$form_state) {
 function inline_entity_form_close_form($form, &$form_state) {
   $element = inline_entity_form_get_element($form, $form_state);
   $ief_id = $element['#ief_id'];
-
+  if (strpos($form_state['clicked_button']['#name'], $ief_id)) {
+    $entity_count = count($form_state['inline_entity_form'][$ief_id]['entities']);
+    $parts = explode('_', $ief_id);
+    $depth = $parts[1];
+    $child_delta = $parts[2];
+    $child_id_part = $depth + 1 . '_' . $entity_count;
+    foreach ($form_state['inline_entity_form'] as $key => $value) {
+      if (!strpos($key, $ief_id) && preg_match("/{$ief_id}--[0-9]+_{$child_id_part}/", $key)) {
+        unset($form_state['inline_entity_form'][$key]);
+      }
+    }
+  }
   $form_state['rebuild'] = TRUE;
   $form_state['inline_entity_form'][$ief_id]['form'] = NULL;
 }
@@ -1231,13 +1281,13 @@ function inline_entity_form_field_attach_submit($parent_entity_type, $parent_ent
   foreach (field_info_instances($parent_entity_type, $bundle_name) as $instance_name => $instance) {
     if (isset($instance['widget']) && strpos($instance['widget']['type'], 'inline_entity_form') === 0) {
       $field_name = $instance['field_name'];
-      $ief_id = $instance['id'];
+      $langcode = $form[$field_name]['#language'];
+      $ief_id = $form[$field_name][$langcode]['#ief_id'];
       // Skip if the field is not on the form or there is no IEF data for it.
       if (empty($form_state['inline_entity_form'][$ief_id]) || !isset($form[$field_name])) {
         continue;
       }
 
-      $langcode = $form[$field_name]['#language'];
       $values = $form_state['inline_entity_form'][$ief_id];
       $entity_type = $values['settings']['entity_type'];
       $controller = inline_entity_form_get_controller($instance);
