fix for asynchronous case