fixed window resize handling