Fixed a small bug in Model.