fix error in index.js