Fix a bug in async task at the beginning