fix menus not building correctly from plugins