A better workaround for menu not expanding in deployed code