fix get_arity for structs to avoid return [-1]