fix some trace bug