solve the bugs of cmd set and reason