minor changes to websocket javascript