Fix a bug on protecting prompt from being erased by the clear button.