fixing logistic regression