Avoid collision and remove thumbnails.