Fix asynchronous issue