fixing window resize