fix debounce and onResize event