fixed trace bug