fix menu toggle bug