Fix memleak in copy constructor