fix bug in untested dom stream code