Fix a bug where the previous message is remember after it is cleared.