bug fixes on the flow graph.