Small socket changes in index.js