click close button will terminate