fixed some parts related to async calls