fix menu visibility bug