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'));
 
