Close button on the ribbon working