fixed the check_network function/button.