minor fixes to coloring algo