Close panel when clicking on button