Websocket improvements