fix async issues