fixed reference error in index.js