Fixed a memleak