fix exception when uploading new thumbnail