fix async issues, cleanup