Update model.js

Dirty hack, please check: this belongs to #33. This fix made it working for me btw.