thread delete restore fix