Fix some window resize issues