Fix logic when the network becomes available again