Make logistic regression work