Added timeout to window resize