fixed bug in constraint search: