fixed alert crash when clicking menu buttons