diff --git a/includes/rules.core.inc b/includes/rules.core.inc
index b526017..129df95 100644
--- a/includes/rules.core.inc
+++ b/includes/rules.core.inc
@@ -2093,7 +2093,7 @@ abstract class RulesContainerPlugin extends RulesPlugin implements IteratorAggre
     // Make sure the array order is kept in case two children have the same
     // weight by ensuring later childrens would have higher weights.
     foreach (array_values($this->children) as $i => $child) {
-      $child->weight += $i / 1000;
+      $child->weight += (float)($i / 1000);
     }
     usort($this->children, array('RulesPlugin', 'compare'));
 
diff --git a/ui/ui.core.inc b/ui/ui.core.inc
index 70d75a9..dcb0901 100644
--- a/ui/ui.core.inc
+++ b/ui/ui.core.inc
@@ -976,6 +976,9 @@ class RulesContainerPluginUI extends RulesPluginUI {
     // Recurse over all element childrens or use the provided iterator.
     $iterator = isset($iterator) ? $iterator : $this->element->elements();
     $root_depth = $this->element->depth();
+
+    // Keeps children maximun weight + 10. Defaults to 20
+    $max_delta_weight = 20;
     foreach ($iterator as $key => $child) {
       $id = $child->elementId();
 
@@ -986,10 +989,14 @@ class RulesContainerPluginUI extends RulesPluginUI {
         '#container' => $is_container,
       );
       $form['elements'][$id]['label'] = $child->buildContent();
+
+      // We will use $max_delta_weight to set same element's delta weights in the next foreach
+      $max_delta_weight = $child->weight > $max_delta_weight ? $child->weight + 10: $max_delta_weight;
+
       $form['elements'][$id]['weight'] = array(
         '#type' => 'weight',
         '#default_value' => $child->weight,
-        '#delta' => 20,
+        '#delta' => $max_delta_weight,
       );
       $form['elements'][$id]['parent_id'] = array(
         '#type' => 'hidden',
@@ -1004,6 +1011,15 @@ class RulesContainerPluginUI extends RulesPluginUI {
       $form['elements'][$id]['operations'] = $child->operations();
     }
 
+    // Make sure #delta weight for each element has, at least, 10 more "points"
+    // than the highest weight detected by $max_delta_weight.
+    $iterator = isset($iterator) ? $iterator : $this->element->elements();
+    $root_depth = $this->element->depth();
+    foreach ($iterator as $key => $child) {
+      $id = $child->elementId();
+      $form['elements'][$id]['weight']['#delta'] = $max_delta_weight;
+    }
+
     // Alter the submit button label.
     if (!empty($options['button']) && !empty($options['init'])) {
       $form['submit']['#value'] = t('Continue');
