fixed (and improved) support for multithreading, now it actually
uses identifier and sequence number
screw it, I left debug code in, removed
dirty fix for tracepath, previous changes kind of broked it