     ;; (println "  MET TASK" task) ;; DEBUG
     (update-htn-object!
       (assoc-if task
-        :arguments arguments
+        :arguments new-arguments
         :temporal-constraints (and temporal-constraints
                                 (copy-temporal-constraints temporal-constraints))))))
 

                (let [nonprimitive-task (htn-nonprimitive-task
                                          {:pclass pclass
                                           :name mname
                                           :arguments margs
                                           :temporal-constraints
                                           temporal-constraints

    ))

(defn construct-htn-plan-map [ir expanded-root-task]
  ;;(println expanded-root-task)
  (let [{:keys [uid label pargs]} expanded-root-task
        ;; _ (println "ERT PARGS" pargs) ;; DEBUG
        net (htn-network {:label label :rootnodes #{uid}})
