fix top menu to work with sub-menus