Debug for window resize and maximize