[thumbnail] Improve thumbnail setting
Merge pull request #321 from haiwen/4.0-thumbnail-setting-fix

[thumbnail] Improve thumbnail setting