Cleanup of patch.