fix specs sometimes failing
add a couple of DomUtil tests, #1347