Fix bug in agreementApiModel.