wait for window load before resize