Fixes the issue with deleting thumbnails.