Fixed bug when network is off