                   (let [left-node (aget (.-children parent) (- parent-ix 1))
                         min-keys (js/Math.floor (/ max-keys 2))]
                     (if (> (alength (.-keys left-node)) min-keys)
-                      (let [key&val&child (.pop! left-node (- (alength (.-keys left-node)) 1) right-child)]
-                        (.push! this 0 #js [(aget (.-keys parent) parent-ix) (aget (.-vals parent) parent-ix) (aget key&val&child 2)] left-child)
-                        (aset (.-keys parent) parent-ix (aget key&val&child 0))
-                        (aset (.-vals parent) parent-ix (aget key&val&child 1))
+                      (let [key&val&child (.pop! left-node (- (alength (.-keys left-node)) 1) right-child)
+                            separator-ix (- parent-ix 1)]
+                        (.push! this 0 #js [(aget (.-keys parent) separator-ix) (aget (.-vals parent) separator-ix) (aget key&val&child 2)] left-child)
+                        (aset (.-keys parent) separator-ix (aget key&val&child 0))
+                        (aset (.-vals parent) separator-ix (aget key&val&child 1))
                         (.maintain! this max-keys)
                         (.maintain! left-node max-keys)
                         (.maintain! parent max-keys))

                   (let [right-node (aget (.-children parent) (+ parent-ix 1))
                         min-keys (js/Math.floor (/ max-keys 2))]
                     (if (> (alength (.-keys right-node)) min-keys)
                       (let [key&val&child (.pop! right-node 0 left-child)]
                         (.push! this (alength keys) #js [(aget (.-keys parent) parent-ix) (aget (.-vals parent) parent-ix) (aget key&val&child 2)] right-child)
                         (aset (.-keys parent) parent-ix (aget key&val&child 0))
                         (aset (.-vals parent) parent-ix (aget key&val&child 1))
                         (.maintain! this max-keys)
                         (.maintain! right-node max-keys)
                         (.maintain! parent max-keys))

                 movements (gen/vector gen-movement)]
                (run-iterator-prop min-keys actions movements)))

(comment
  (dc/quick-check 1000 least-prop)
  (dc/quick-check 1000 greatest-prop)
