Fixing error in index.js