websocket: Fix some trivial bugs.
Merge pull request #47 from methane/websocket

websocket: Fix some trivial bugs.