fix return value in randomize_graph_partial_und

This function was unusable until now.