Make  sure the load event is fired on document