check for close button