Fix bug with resize events and thumbnails