Fix mismatched new/delete