fix spurious text replacement