Fixed window resize calculations