Minor improvements for logistic regression