Fixed switch statement error in index.js