misc fixes to websocket