Issue with async modules and function calls