bug fix - exit when network disconnect