valgrad memleak fixed