fix of recursive training() and evaluate()