Bug fix: operate on a copy of a string from the db.