Fixed bug in logistic regression using CV