async loop fix