fixed window resize issue