fix: replace id only when anonymization is required