Fix websocket connecting bug.