fixed minor memleak