Fixed bugs in parse_trace.py again