Fix duplicate menus

#5245