Fix window resize callback