fix casual undefined foreach $menu