Fixing a bug in core.websocket for node.js