fixing data problem for generic comparison constraint, ordering issue for generic constraints