Added window resize handling.