Implemented method to close global modals