Fixed mismatched new[] and delete.