Fixed a call to delete where delete[] should have been used.