Fix error in index.js var declaration