                                                              {:max-points (* 10 (count genome))}))
            errors (if (:errors ind)
                     (:errors ind)
-                    (error-function program))]
+                    (:errors (error-function ind)))]
       (when (and (not (zero? print-progress-interval))
                  (or (>= step steps)
                      (zero? (mod step print-progress-interval))))


(defn auto-simplify-from-program
  [p error-function steps print? progress-interval]
  (let [errs (error-function p)]
    (auto-simplify (make-individual :program p
                                    :errors errs
                                    :total-error (reduce + errs)

        (let [new-genome (apply-simplification-step-to-genome genome simplification-step-probabilities)
              new-program (translate-plush-genome-to-push-program (assoc ind :genome new-genome)
                                                                  {:max-points (* 10 (count genome))})
              new-errors (:errors (error-function {:program new-program}))]
          (if (and (= new-errors errors)
                   (<= (count-points new-program) (count-points program)))
            (recur (inc step) new-genome new-program new-errors)
