Fixes query_spec for cardinality many but not ref type
Fixes replacing cardinality many of entity refs
Fixes CRbuy error