fix menu not closing issue