fix refresh on window resize