Cancel button and error bette forms error message.

Fix error message when click on cancel button.