corrected a bug in traces