Fix an exception and remove code that was missed when TextPrompt