Added an onResize event