Fix window.updateSize error