Fix a DOM ready bug when ender is loaded on the top of the page