fixing issue with async