fix logistic regression problem