           (util/find-first (fn [[pv cv]] (env/get-var s (parent-var pv cv))) aa-parent-edges)
             (let [[pv cv] x, 
                   p-val (env/get-var s pv)
-                  d-val (util/safe-get-in (env/get-var s (action-var cv)) [:precond-map pv])]
-              (apply concat (map (get-in dtgs [pv p-val]) (acyclic-succ-fn pv p-val d-val))))
+                  d-val ((:precond-map (env/get-var s (action-var cv))) pv)
+                  dtg   (get-in dtgs [pv p-val])]
+              (for [n-val (acyclic-succ-fn pv p-val d-val), a (dtg n-val)]
+                (make-add-action-action a)))
 
           ;; Inactive bottom-up var -- needs to be assigned.  
           (first aa-parent-edges)

     (env/goal-map sas-problem))))

(defn asplan-solution-name [sol]
  (map second (filter #(= (first %) ::GreedyFire) (map env/action-name sol))))

(defn asplan-solution-pair-name [[sol rew]]
  [(asplan-solution-name sol) rew])

       [[(action-var sas/goal-var-name) goal-action]
        [(free-var sas/goal-var-name) false]]))))

(def *add-count* (util/sref 0))

(defn make-add-action-action [{:keys [name precond-map effect-map reward] :as factored-primitive}]
  (util/sref-set! *add-count* (inc (util/sref-get *add-count*)))
  (let [[evar eval] (util/safe-singleton (seq effect-map))]
    (env/FactoredPrimitive
     [::AddAction name]
