Update faulty index.js