Fixed a bug in dom.js append