Changed the Thumbnail delete logic and fix tests
Merge 'thumbnail_fix_pr_2' into thumbnail_fix_pr_test