Fixed the get_network function