Fix asynchronous tests