Close button now completely works