Clear the text before setting the previous value