Replaced preparePlainTextValue with the real API