Polished validation of close button