Fixed several bugs in the constraint coloring routine