Window ready event changed to load event