Fixed bugs in comm thread tracing