fix a websocket bug