Memleak fixed