Fixed X button not being hidden