fixed bug of trace