minor fixes in index.js