update websocket handling a bit