Bug fixing: k-fold cross-validation was failing for ensembles