fix async tasks
Merge branch 'fix_async_tasks' into add_unit_tests