fix error while getting menu items