fix js hint errors in index.js