fix naming bugs in index.js (thanks tests)