Fixes adaboost bugs.