Fixed bug with cardinality.