Fix memleak

Fix memleak