fix bugs in randomGraph's function show_graph