Memory leak fixes
Merge branch 'master' of https://github.com/mdhim/mdhim-tng