fix errors in WirelessNumHops and DijkstraKshortest