diff --git a/conditional_fields.module b/conditional_fields.module
index 23b8cb2..874725a 100644
--- a/conditional_fields.module
+++ b/conditional_fields.module
@@ -261,10 +261,22 @@ function conditional_fields_element_after_build($element, &$form_state) {
   if (!isset($field['#entity_type'], $field['#bundle'])) {
     $entity_type = $form_state['complete form']['#entity_type'];
     $bundle = $form_state['complete form']['#bundle'];
+
+    $form_now = $form_state['complete form'];
+    foreach ($field['#array_parents'] AS $key) {
+      if (isset($form_now[$key]['#entity_type'])) {
+        $entity_type = $form_now[$key]['#entity_type'];
+      }
+
+      if (isset($form_now[$key]['#bundle'])) {
+        $bundle = $form_now[$key]['#bundle'];
+      }
+      $form_now = $form_now[$key];
+    }
   }
   else {
     $entity_type = $field['#entity_type'];
-    $bundle = $field['#bundle'];    
+    $bundle = $field['#bundle'];
   }
 
   $dependencies = conditional_fields_load_dependencies($entity_type, $bundle);
