memory leak, dom recovery fix