Complete constraint solving, fix constraint propagation bug for pairs