fix the asynchronous close exception