Graph: fix error in coloring by I/O