minor fux in the graph cleaning loop