Fixed close button event handler