Fixes some API changes and code generation for multiplicity "1"