Fix #11 - moved iterator initialization in HyperGraph.to_graph out of the for loop