Fixed a bug in Model.js