Cancel button and error message.

Fix error message when click on cancel button.