Fix to websocket creation