a couple of dom.js fixes