fixed bug in trace printer