Fixed bug when multiple dom ready events.