fix async tasks to run in order