Fixed mem leak