Fix invalid/mismatched deallocators.