fix(index.js) : fix error introduced by error handling. tsk