fix async behavior