fixed bug in async