fix Randomize_graph_partial_und

One bug fix and one tweak.