bugfix to cardinality