fixed mismatch free/delete/delete[]