Added debounce to resize event