final memory leaks fix