Improve menu close