Fix deleteThumbnails method