Fix a bug in index.js
add model related in global