fix using ping
fix websocket checking bugs