fix for window resize