fix close without adapter