fix bug at Trace and modified its behavior.