fixed logreg bug introduced by last commit