Fixed window resize handler