fix a bug about tracing that when you visit the node that you have already visited, it should turn to red.