Fix window on resize listener