sequence_trace.py bugfixes