diff --git a/manualcrop.helpers.inc b/manualcrop.helpers.inc
index f3a9b8f..4bab9f2 100644
--- a/manualcrop.helpers.inc
+++ b/manualcrop.helpers.inc
@@ -150,10 +150,8 @@ function manualcrop_instance_required_styles($settings) {
  */
 function manualcrop_croptool_process(&$form, &$form_state, &$element, $file, $settings = array(), $instance = NULL, $preview = 'preview') {
   static $processed_forms;
-
   if (user_access('use manualcrop') && (!empty($_COOKIE['has_js']) || variable_get('manualcrop_skip_js_check', FALSE))) {
     $styles = manualcrop_styles_with_crop();
-
     if (!empty($styles)) {
       // Merge-in the instance or default settings.
       if (is_array($instance)) {
@@ -180,7 +178,6 @@ function manualcrop_croptool_process(&$form, &$form_state, &$element, $file, $se
 
       // Required image styles.
       $required = manualcrop_instance_required_styles($settings);
-
       // Make sure the build id exists.
       if (!isset($form['#build_id'])) {
         $form['#build_id'] = 'form-' . drupal_random_key();
@@ -215,12 +212,13 @@ function manualcrop_croptool_process(&$form, &$form_state, &$element, $file, $se
         }
 
         // Create a file specific container.
-        $element['manualcrop']['file_' . $file->fid] = array(
-          '#type' => 'value',
-          '#default_value' => array(),
-          '#element_validate' => array('manualcrop_croptool_validate'),
-          '#parents' => array('manualcrop', 'file_' . $file->fid),
-        );
+
+          $element['manualcrop']['file_' . $file->fid] = array(
+            '#type' => 'value',
+            '#default_value' => array(),
+            '#element_validate' => array('manualcrop_croptool_validate'),
+            '#parents' => array(array('manualcrop', 'file_' . $file->fid)),
+          );
 
         // Link to the newly created container and item.
         $container = &$element['manualcrop']['file_' . $file->fid];
@@ -235,14 +233,22 @@ function manualcrop_croptool_process(&$form, &$form_state, &$element, $file, $se
 
       // Save some image data to improve processing.
       $image = image_get_info($file->uri);
-      $form_state['manualcrop_data']['images'][$file->fid] = array(
-        'uri' => $file->uri,
-        'filename' => $file->filename,
-        'width' => $image['width'],
-        'height' => $image['height'],
-        'element_parents' => $container['#parents'],
-        'required_styles' => $required,
-      );
+      if(!isset($form_state['manualcrop_data']['images'][$file->fid]))
+      {
+        $form_state['manualcrop_data']['images'][$file->fid] = array(
+          'uri' => $file->uri,
+          'filename' => $file->filename,
+          'width' => $image['width'],
+          'height' => $image['height'],
+          'element_parents' => array($container['#parents']),
+          'required_styles' => $required,
+        );
+      }
+      else
+      {
+        $form_state['manualcrop_data']['images'][$file->fid]['element_parents'] = array_merge($form_state['manualcrop_data']['images'][$file->fid]['element_parents'],array($container['#parents']));
+        $form_state['manualcrop_data']['images'][$file->fid]['required_styles'] = array_merge($form_state['manualcrop_data']['images'][$file->fid]['required_styles'],$required);
+      }
 
       // Get the crop selections for this file.
       $submitted = (isset($form_state['inline_entity_form']) ? FALSE : $form_state['submitted']);
@@ -412,6 +418,7 @@ function _manualcrop_attach_files(&$element = NULL) {
 function _manualcrop_add_croptool(&$element, $value, &$form_state, $fid, $js_identifier, $styles, $required = array(), $settings = array()) {
   // Get the fileinfo.
   $file_info = $form_state['manualcrop_data']['images'][$fid];
+  $id = $element['#id'];
 
   // Overlay or inline cropping.
   if (!empty($settings['manualcrop_inline_crop'])) {
@@ -429,7 +436,7 @@ function _manualcrop_add_croptool(&$element, $value, &$form_state, $fid, $js_ide
     '#type' => 'markup',
     '#markup' => theme('manualcrop_croptool_' . $crop_type, array(
       'attributes' => array(
-        'id' => array('manualcrop-' . $crop_type . '-' . $fid),
+        'id' => array('manualcrop-' . $crop_type . '-' . $id . '-' . $fid),
         'class' => array('manualcrop-' . $crop_type, 'element-hidden'),
       ),
       'image' => array(
@@ -453,9 +460,9 @@ function _manualcrop_add_croptool(&$element, $value, &$form_state, $fid, $js_ide
       '#type' => 'hidden',
       '#default_value' => (isset($value['manualcrop_selections'][$style_name]) ? $value['manualcrop_selections'][$style_name] : ''),
       '#attributes' => array(
-        'id' => 'manualcrop-area-' . $fid . '-' . $style_name,
-        'class' => array('manualcrop-cropdata'),
-        'onchange' => 'ManualCrop.selectionStored(this, ' . $fid . ', \'' . $style_name . '\');',
+        'id' => 'manualcrop-area-' . $id . '-' . $fid . '-' . $style_name,
+        'class' => array('manualcrop-cropdata', 'manualcrop-area-' . $fid . '-' . $style_name),
+        'onchange' => 'ManualCrop.selectionStored(this, ' . $fid . ', \'' . $style_name . '\', \'' . $id . '\');',
       ),
     );
 
@@ -494,7 +501,7 @@ function _manualcrop_add_croptool(&$element, $value, &$form_state, $fid, $js_ide
             (in_array($style_name, $required) ? array('manualcrop-style-required') : array())
           ),
           'href' => 'javascript:void(0);',
-          'onmousedown' => "ManualCrop.showCroptool('" . $js_identifier . "', '" . $style_name . "', " . $fid . ");",
+          'onmousedown' => "ManualCrop.showCroptool('" . $js_identifier . "', '" . $style_name . "', " . $fid . ", '" . $id . "');",
           'onclick' => 'return false;',
         ),
       ));
@@ -519,7 +526,7 @@ function _manualcrop_add_croptool(&$element, $value, &$form_state, $fid, $js_ide
       '#value' => t('Crop'),
       '#attributes' => array(
         'class' => array_merge(array('manualcrop-style-button', 'manualcrop-style-button-' . $fid), (in_array($style_name, $required) ? array('manualcrop-style-required') : array())),
-        'onmousedown' => "ManualCrop.showCroptool('" . $js_identifier . "', '" . $style_name . "', " . $fid . ");",
+        'onmousedown' => "ManualCrop.showCroptool('" . $js_identifier . "', '" . $style_name . "', " . $fid . ", '" . $id . "');",
         'onclick' => 'return false;',
       ),
       '#prefix' => '<div class="manualcrop-style-button-holder">',
@@ -540,7 +547,7 @@ function _manualcrop_add_croptool(&$element, $value, &$form_state, $fid, $js_ide
           'manualcrop-style-select',
           'manualcrop-style-select-' . $fid
         ),
-        'onchange' => "ManualCrop.showCroptool('" . $js_identifier . "', this, " . $fid . ");",
+        'onchange' => "ManualCrop.showCroptool('" . $js_identifier . "', this, " . $fid . ", '" . $id . "');",
       ),
     ));
   }
diff --git a/manualcrop.js b/manualcrop.js
index 148460e..fe08a70 100644
--- a/manualcrop.js
+++ b/manualcrop.js
@@ -78,7 +78,7 @@ ManualCrop.init = function(context) {
  * @param fid
  *   The file id of the image the user is about to crop.
  */
-ManualCrop.showCroptool = function(identifier, style, fid) {
+ManualCrop.showCroptool = function(identifier, style, fid, id) {
   var styleName, styleSelect, cropType, origContainer, conWidth, conHeight;
 
   if (ManualCrop.croptool) {
@@ -100,13 +100,13 @@ ManualCrop.showCroptool = function(identifier, style, fid) {
     // has already been set and skip the rest if this is the case.
     if (!ManualCrop.croptool) {
       // Determine the croptool type.
-      if ($('#manualcrop-overlay-' + fid).length == 1) {
+      if ($('#manualcrop-overlay-' + id + '-' + fid).length == 1) {
         cropType = 'overlay';
-        origContainer = $('#manualcrop-overlay-' + fid);
+        origContainer = $('#manualcrop-overlay-' + id + '-' + fid);
       }
       else {
         cropType = 'inline';
-        origContainer = $('#manualcrop-inline-' + fid);
+        origContainer = $('#manualcrop-inline-' + id + '-' + fid);
       }
 
       // Get the settings.
@@ -114,7 +114,7 @@ ManualCrop.showCroptool = function(identifier, style, fid) {
       var elementSettings = Drupal.settings.manualcrop.elements[identifier] || null;
 
       // Get the destination element and the current selection.
-      ManualCrop.output = $('#manualcrop-area-' + fid + '-' + styleName);
+      ManualCrop.output = $('.manualcrop-area-' + fid + '-' + styleName);
       ManualCrop.oldSelection = ManualCrop.parseStringSelection(ManualCrop.output.val());
 
       // Create the croptool.
@@ -587,30 +587,30 @@ ManualCrop.updateSelection = function(image, selection) {
  * @param styleName
  *   The image style name.
  */
-ManualCrop.selectionStored = function(element, fid, styleName) {
+ManualCrop.selectionStored = function(element, fid, styleName, id) {
   var selection = $(element).val();
 
   ManualCrop.isLoaded('.manualcrop-file-' + fid + '-holder', function() {
-    var previewHolder = $('.manualcrop-preview-' + fid + '-' + styleName + ' .manualcrop-preview-cropped');
+    var previewHolder = $('#' + id + ' .manualcrop-preview-' + fid + '-' + styleName + ' .manualcrop-preview-cropped');
     if (!previewHolder.length) {
-      previewHolder = $('.manualcrop-preview-' + fid + ' .manualcrop-preview-cropped');
+      previewHolder = $('#' + id + ' .manualcrop-preview-' + fid + ' .manualcrop-preview-cropped');
     }
 
-    var defaultPreview = $('.manualcrop-preview-' + fid + '-' + styleName + ' > img');
+    var defaultPreview = $('#' + id + ' .manualcrop-preview-' + fid + '-' + styleName + ' > img');
     if (!defaultPreview.length) {
-      defaultPreview = $('.manualcrop-preview-' + fid + ' > img');
+      defaultPreview = $('#' + id + ' .manualcrop-preview-' + fid + ' > img');
     }
 
     // Change the elements if Media is detected.
-    var media = $('.manualcrop-preview-' + fid + ' .media-item[data-fid] .media-thumbnail');
+    var media = $('#' + id + ' .manualcrop-preview-' + fid + ' .media-item[data-fid] .media-thumbnail');
 
     if (media.length) {
       media.prepend(previewHolder);
       previewHolder = media.find('.manualcrop-preview-cropped');
-      defaultPreview = $('.manualcrop-preview-' + fid + ' .media-item[data-fid] .media-thumbnail > img');
+      defaultPreview = $('#' + id + ' > .manualcrop-preview-' + fid + ' .media-item[data-fid] .media-thumbnail > img');
     }
 
-    var toolOpener = $('.manualcrop-style-select-' + fid + " option[value='" + styleName + "'], .manualcrop-style-button-" + fid + ', .manualcrop-style-thumb-' + fid + '-' + styleName + ' .manualcrop-style-thumb-label');
+    var toolOpener = $('#' + id +' .manualcrop-style-select-' + fid + " option[value='" + styleName + "'], .manualcrop-style-button-" + fid + ', .manualcrop-style-thumb-' + fid + '-' + styleName + ' .manualcrop-style-thumb-label');
     var hasClass = toolOpener.hasClass('manualcrop-style-cropped');
 
     if (previewHolder.length && previewHolder.children().length) {
@@ -647,7 +647,7 @@ ManualCrop.selectionStored = function(element, fid, styleName) {
           var scaleY = resized.height / selection.height;
 
           // Get the original image and its dimensions.
-          var originalImage = $('#manualcrop-overlay-' + fid + ' img.manualcrop-image, #manualcrop-inline-' + fid + ' img.manualcrop-image');
+          var originalImage = $('#manualcrop-overlay-' + id + '-' + fid + ' img.manualcrop-image, #' + id + ' #manualcrop-inline-' + fid + ' img.manualcrop-image');
           var dimensions = ManualCrop.getImageDimensions(originalImage);
 
           // Calculate the new width and height using the full image.
diff --git a/manualcrop.module b/manualcrop.module
index a0f24de..99c9c85 100644
--- a/manualcrop.module
+++ b/manualcrop.module
@@ -407,66 +407,77 @@ function manualcrop_croptool_validate($element, &$form_state) {
 
     // Loop trough the positions to get the Manual Crop data.
     foreach ($form_state['manualcrop_data']['images'] as $fid => $image) {
-      $value = drupal_array_get_nested_value($form_state['values'], $image['element_parents']);
-
-      if (!empty($value['manualcrop_selections'])) {
-        // Create a selections array for the current image, the first element is
-        // the path to the original image, needed for flushing the cache.
-        $selections[$fid] = array(
-          'path' => $image['uri'],
-          'styles' => array_fill_keys(array_keys($value['manualcrop_selections']), FALSE),
-        );
-
-        // Indicates if an error on the form element has been set.
-        $error_set = FALSE;
-
-        // Loop over the selections.
-        foreach ($value['manualcrop_selections'] as $style_name => $crop) {
-          // Get the clean style name.
-          $clean_style_name = _manualcrop_image_style_label($style_name);
-
-          // Get the element key.
-          if (!$error_set) {
-            $element_key = implode('][', $image['element_parents']) . '][manualcrop_style';
+      foreach($image['element_parents'] as $parent)
+      {
+        //$value = drupal_array_get_nested_value($form_state['values'], $image['element_parents']);
+        $value = drupal_array_get_nested_value($form_state['values'],$parent);
+
+        if (!empty($value['manualcrop_selections'])) {
+          // Create a selections array for the current image, the first element is
+          // the path to the original image, needed for flushing the cache.
+          if(!isset($selections[$fid]))
+          {
+            $selections[$fid] = array(
+              'path' => $image['uri'],
+              'styles' => array_fill_keys(array_keys($value['manualcrop_selections']), FALSE),
+            );
           }
-          else {
-            $element_key = implode('][', $image['element_parents']) . '][manualcrop_selections][' . $style_name;
+          else
+          {
+            $selections[$fid]['styles'] = array_merge($selections[$fid]['styles'],array_fill_keys(array_keys($value['manualcrop_selections']), FALSE));
           }
 
-          if (!empty($crop)) {
-            // Validate the crop selection format.
-            if (preg_match('/^([0-9]+\|){3}[0-9]+$/', $crop)) {
-              $crop = array_map('intval', explode('|', $crop));
-
-              // Check position and minimum dimensions.
-              if ($crop[0] >= 0 && $crop[1] >= 0 && $crop[2] > 0 && $crop[3] > 0) {
-                // Check if the selections fits on the image.
-                if (($crop[0] + $crop[2]) <= $image['width'] && ($crop[1] + $crop[3]) <= $image['height']) {
-                  $selections[$fid]['styles'][$style_name] = array(
-                    'x' => $crop[0],
-                    'y' => $crop[1],
-                    'width' => $crop[2],
-                    'height' => $crop[3],
-                  );
-                  continue;
+          // Indicates if an error on the form element has been set.
+          $error_set = FALSE;
+
+          // Loop over the selections.
+          foreach ($value['manualcrop_selections'] as $style_name => $crop) {
+            // Get the clean style name.
+            $clean_style_name = _manualcrop_image_style_label($style_name);
+
+            // Get the element key.
+            if (!$error_set) {
+              $element_key = implode('][', $image['element_parents']) . '][manualcrop_style';
+            }
+            else {
+              $element_key = implode('][', $image['element_parents']) . '][manualcrop_selections][' . $style_name;
+            }
+
+            if (!empty($crop)) {
+              // Validate the crop selection format.
+              if (preg_match('/^([0-9]+\|){3}[0-9]+$/', $crop)) {
+                $crop = array_map('intval', explode('|', $crop));
+
+                // Check position and minimum dimensions.
+                if ($crop[0] >= 0 && $crop[1] >= 0 && $crop[2] > 0 && $crop[3] > 0) {
+                  // Check if the selections fits on the image.
+                  if (($crop[0] + $crop[2]) <= $image['width'] && ($crop[1] + $crop[3]) <= $image['height']) {
+                    $selections[$fid]['styles'][$style_name] = array(
+                      'x' => $crop[0],
+                      'y' => $crop[1],
+                      'width' => $crop[2],
+                      'height' => $crop[3],
+                    );
+                    continue;
+                  }
                 }
               }
-            }
 
-            // Invalid crop selection.
-            $error_set = TRUE;
-            form_set_error($element_key, t('The crop selection for %filename (@style image style) is invalid, please clear it or reselect.', array(
-              '@style' => $clean_style_name,
-              '%filename' => $image['filename']
-            )));
-          }
-          elseif (in_array($style_name, $image['required_styles'], TRUE)) {
-            // Uncropped required style.
-            $error_set = TRUE;
-            form_set_error($element_key, t('%filename must have a cropping selection for the @style image style.', array(
-              '@style' => $clean_style_name,
-              '%filename' => $image['filename']
-            )));
+              // Invalid crop selection.
+              $error_set = TRUE;
+              form_set_error($element_key, t('The crop selection for %filename (@style image style) is invalid, please clear it or reselect.', array(
+                '@style' => $clean_style_name,
+                '%filename' => $image['filename']
+              )));
+            }
+            elseif (in_array($style_name, $image['required_styles'], TRUE)) {
+              // Uncropped required style.
+              $error_set = TRUE;
+              form_set_error($element_key, t('%filename must have a cropping selection for the @style image style.', array(
+                '@style' => $clean_style_name,
+                '%filename' => $image['filename']
+              )));
+            }
           }
         }
       }
