Finish some bug in the websocket thing.