repair memleak