diff --git a/lib/blocklib.php b/lib/blocklib.php
index 9413201..32459e5 100644
--- a/lib/blocklib.php
+++ b/lib/blocklib.php
@@ -725,12 +725,12 @@ class block_manager {
      * @param string $subpagepattern optional. Passed to @see add_block()
      */
     public function add_blocks($blocks, $pagetypepattern = NULL, $subpagepattern = NULL, $showinsubcontexts=false, $weight=0) {
+        $initialweight = $weight;
         $this->add_regions(array_keys($blocks));
         foreach ($blocks as $region => $regionblocks) {
-            $weight = 0;
-            foreach ($regionblocks as $blockname) {
+            foreach ($regionblocks as $offset => $blockname) {
+                $weight = $initialweight + $offset;
                 $this->add_block($blockname, $region, $weight, $showinsubcontexts, $pagetypepattern, $subpagepattern);
-                $weight += 1;
             }
         }
     }
@@ -2093,14 +2093,18 @@ function blocks_parse_default_blocks_list($blocksstr) {
     $bits = explode(':', $blocksstr);
     if (!empty($bits)) {
         $leftbits = trim(array_shift($bits));
-        if ($leftbits != '') {
-            $blocks[BLOCK_POS_LEFT] = explode(',', $leftbits);
+        foreach (explode(',', $leftbits) as $index => $leftbit) {
+            if ($leftbit != '') {
+                $blocks[BLOCK_POS_LEFT][$index] = $leftbit;
+            }
         }
     }
     if (!empty($bits)) {
-        $rightbits =trim(array_shift($bits));
-        if ($rightbits != '') {
-            $blocks[BLOCK_POS_RIGHT] = explode(',', $rightbits);
+        $rightbits = trim(array_shift($bits));
+        foreach (explode(',', $rightbits) as $index => $rightbit) {
+            if ($rightbit != '') {
+                $blocks[BLOCK_POS_RIGHT][$index] = $rightbit;
+            }
         }
     }
     return $blocks;
