* Fix some problems with handling WebSockets that didn't open.
* Fix an event handling bug.