Async tests and bug fixes