Fixed bug in parse_trace