Fixed bug in loading menuItems from XML