Fix bug related to isAsync flag

merge