fix menu generation helper