fixed fit.py