websocket: Fix some trivial bugs.