fixed: window resize bugs