Fixed a small bug in the Model class.