fixing some bugs in core.websockets provider