Fixed up trace support to work in async mode