Fixed close button crash