Fixed menu closing bug