corrected menu open and close