fixed error with cardinality