bug with model.js fixed