   :disable-asg
   [{:keys [environment region] deployment-id :id :as deployment} task]
   (if-let [asg (get-in deployment [:parameters
-                                   (old-asg-name-key deployment)])]
+                                   (old-asg-name-key task)])]
     (asgard/disable-asg environment region asg deployment-id task
                         task-finished task-timed-out)
     (let [task (assoc (util/append-to-task-log "No old ASG to disable" task)

  :delete-asg
  [{:keys [environment region] deployment-id :id :as deployment} task]
  (if-let [asg (get-in deployment [:parameters
                                   (old-asg-name-key deployment)])]
    (asgard/delete-asg
     environment region asg deployment-id task task-finished task-timed-out)
    (let [task (assoc (util/append-to-task-log "No old ASG to delete" task)

                     (get-in deployment
                             [:parameters :selectedLoadBalancers]))
          asg-name (get-in deployment
                           [:parameters (new-asg-name-key task)])]
      (health/wait-until-elb-healthy environment region elb-names asg-name
                                     deployment-id task task-finished
                                     task-timed-out))
