Corrected so menuType attribute is taken into account