add close event for restart menue when clicking on "x"