closing error window, when clicking on cancel