curldl - substring replacement fix