fixed for recover memory after completion