Fixed a problem, where the rewire function would not always find the closest cluster