Minor fixes to simplify WebsocketConnection process