Finally implemented and subsequently fixed the collapse menu