fix Randomize_graph_partial_und

Two bug fixes and one tweak.