correcting window load