fixed readIndex.js for real this time #527