fixed bug in constraint graph