Fixed bugs in $.DOM.ready()