fix websocket checking bugs