fix onResize handler