Fixed bug with model.py