fixed bug with network disconnect