Added a fix for python3 expit problem