Bug fixes in logistic_regression.py for changes in structure of that data