bug fix: getSubMenu should access object and not array