fix bugs in topictrace