fix menu exit bug