window resize handled gracefully