fix when resizing (and reset events on change)