fix bug in index.js 2