diff --git a/imagefield_crop.js b/imagefield_crop.js
index 393e43a..873039c 100644
--- a/imagefield_crop.js
+++ b/imagefield_crop.js
@@ -47,11 +47,11 @@ Drupal.behaviors.imagefield_crop = {
           },
           onSelect: function(c) {
             $(widget).siblings('.preview-existing').css({display: 'none'});
-            $(widget).siblings(".edit-image-crop-x").val(c.x);
-            $(widget).siblings(".edit-image-crop-y").val(c.y);
-            if (c.w) $(widget).siblings(".edit-image-crop-width").val(c.w);
-            if (c.h) $(widget).siblings(".edit-image-crop-height").val(c.h);
-            $(widget).siblings(".edit-image-crop-changed").val(1);
+            $(widget).children(".edit-image-crop-x").val(c.x);
+            $(widget).children(".edit-image-crop-y").val(c.y);
+            if (c.w) $(widget).children(".edit-image-crop-width").val(c.w);
+            if (c.h) $(widget).children(".edit-image-crop-height").val(c.h);
+            $(widget).children(".edit-image-crop-changed").val(1);
           },
           aspectRatio: settings.imagefield_crop[id].box.ratio,
           boxWidth: settings.imagefield_crop[id].box.box_width,
@@ -61,10 +61,10 @@ Drupal.behaviors.imagefield_crop = {
            * Setting the select here calls onChange event, and we lose the original image visibility
           */
           setSelect: [
-            parseInt($(widget).siblings(".edit-image-crop-x").val()),
-            parseInt($(widget).siblings(".edit-image-crop-y").val()),
-            parseInt($(widget).siblings(".edit-image-crop-width").val()) + parseInt($(widget).siblings(".edit-image-crop-x").val()),
-            parseInt($(widget).siblings(".edit-image-crop-height").val()) + parseInt($(widget).siblings(".edit-image-crop-y").val())
+            parseInt($(widget).children(".edit-image-crop-x").val()),
+            parseInt($(widget).children(".edit-image-crop-y").val()),
+            parseInt($(widget).children(".edit-image-crop-width").val()) + parseInt($(widget).children(".edit-image-crop-x").val()),
+            parseInt($(widget).children(".edit-image-crop-height").val()) + parseInt($(widget).children(".edit-image-crop-y").val())
           ]
         });
       });
diff --git a/imagefield_crop.module b/imagefield_crop.module
index 6b51101..ca25c48 100644
--- a/imagefield_crop.module
+++ b/imagefield_crop.module
@@ -27,6 +27,15 @@ function imagefield_crop_field_widget_info() {
 }
 
 /**
+ * Implements hook_filefield_sources_widgets().
+ *
+ * This returns a list of widgets that are compatible with FileField Sources.
+ */
+function imagefield_crop_filefield_sources_widgets() {
+  return array('imagefield_crop_widget');
+}
+
+/**
  * Implements hook_field_widget_settings_form().
  */
 function imagefield_crop_field_widget_settings_form($field, $instance) {
@@ -169,7 +178,8 @@ function imagefield_crop_field_widget_form(&$form, &$form_state, $field, $instan
 
     //dpm($elements[$delta]);
     // Register our value callback
-    $elements[$delta]['#file_value_callbacks'][] = 'imagefield_crop_widget_value';
+    $elements[$delta]['#file_value_callbacks'] =
+      array_merge(array('imagefield_crop_widget_value'), element_info_property('managed_file', '#file_value_callbacks', array()));
 
   }
   return $elements;
@@ -409,8 +419,8 @@ function theme_imagefield_crop_widget($variables) {
     $output .= drupal_render($element['cropbox']);
     $output .= '</div>';
   }
-  $output .= '</div>';
   $output .= drupal_render_children($element);
+  $output .= '</div>';
   return $output;
 }
 
